dengliming opened a new issue, #611:
URL: https://github.com/apache/shenyu-dashboard/issues/611
## Description
`handleDelete(record.path)` filters `allData` with `item.path !== key`. Rows
added via `handleAddTd` all start with `path: ""`, so deleting one blank row
deletes every blank (or duplicate) row. The table also uses `rowKey={(record)
=> record.id}` while new rows only have a `key`, so all new rows get key
`undefined` and their inputs get remounted/mis-bound while typing.
## Location
(Lines refer to `master @ 83969a5`.)
- `src/routes/System/AppAuth/AddTable.js:72` (delete button)
- `src/routes/System/AppAuth/AddTable.js:158-162` (`handleDelete`)
- `src/routes/System/AppAuth/AddTable.js:337` (`rowKey`)
## Impact
Adding several paths to an AppAuth record and deleting one of them removes
all rows with the same path, and typing into newly added rows behaves
erratically because of duplicate React keys.
## Suggested fix
Delete by a stable per-row key (`record.key` or `record.id`) and use
`rowKey={(record) => record.id ?? record.key}`.
## Related existing
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]