Replace index keys with stable keys in editable list components

This commit is contained in:
2026-04-21 19:04:18 +02:00
parent 4da2703966
commit 094fb4fece
8 changed files with 209 additions and 10 deletions

View File

@@ -375,7 +375,11 @@ const source = timeRange === "24h" ? "fail2ban" : "archive";
---
### TASK-019 — Replace index keys with stable keys in editable lists
### TASK-019 — Replace index keys with stable keys in editable lists (done)
**Where fixed:** `frontend/src/components/config/StringListEditor.tsx`, `frontend/src/components/config/RegexList.tsx`, `frontend/src/components/config/JailsTab.tsx`, `frontend/src/components/config/stableListEntries.ts`
**Summary:** Added stable internal IDs for editable string lists, replaced index-based React keys with stable entry IDs, and updated the jail log path list to use the path value as its key.
**Where found:** 19 instances identified, including:
- `frontend/src/components/config/StringListEditor.tsx` line 34 — `key={index}` on editable `Input` rows.