Refactor ProgressionSlotCard Key Prop for Improved Stability
All checks were successful
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m39s

- Updated the key prop in the ProgressionSlotCard component to use a simpler index-based key, enhancing the stability of component rendering during updates.
- This change aims to prevent potential issues with component re-renders and improve overall performance in the ProgressionGraphEditor.
This commit is contained in:
Lars 2026-06-13 17:33:36 +02:00
parent 313d613b7c
commit b629f192ac

View File

@ -1149,7 +1149,7 @@ export default function ProgressionGraphEditor({ graphId, embedded = false, onSa
{draft.slots.map((slot, idx) => ( {draft.slots.map((slot, idx) => (
<ProgressionSlotCard <ProgressionSlotCard
key={`slot-${idx}-${slot.learning_goal?.slice(0, 12) || 'x'}`} key={`slot-${idx}`}
slot={slot} slot={slot}
slotIndex={idx} slotIndex={idx}
slotCount={draft.slots.length} slotCount={draft.slots.length}