fix: Cursor-Problem beim Frage-ID Editieren
Problem: Cursor springt nach jedem Tastendruck aus dem ID-Feld
Ursache: key={q.id} in QuestionEditor map
- Wenn ID geändert wird, ändert sich der React Key
- React unmountet alte Component und mountet neue
- Focus geht verloren
Lösung: key={idx} verwenden
- Stabiler Key während Editing
- Komponente bleibt gemountet
- Cursor bleibt im Feld
UX: Jetzt kann man IDs flüssig editieren ohne Unterbrechung
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
08c9cccdcc
commit
77f1ed14c5
|
|
@ -47,7 +47,7 @@ export function QuestionAugmentationPanel({ node, onChange }) {
|
|||
|
||||
{questions.map((q, idx) => (
|
||||
<QuestionEditor
|
||||
key={q.id}
|
||||
key={idx}
|
||||
question={q}
|
||||
index={idx}
|
||||
onChange={(field, value) => handleQuestionChange(idx, field, value)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user