[UI] Tweak unique keys (#12293)

- Reduce reliance on mutable idx
This commit is contained in:
Oliver 2026-07-02 20:06:53 +10:00 committed by GitHub
parent 5532946473
commit 836a05a104
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -65,8 +65,8 @@ const AboutContent = ({
function fillTable(lookup: AboutLookupRef[], data: any, alwaysLink = false) {
return lookup
.filter((entry: AboutLookupRef) => !!data[entry.ref])
.map((entry: AboutLookupRef, idx) => (
<Table.Tr key={idx}>
.map((entry: AboutLookupRef) => (
<Table.Tr key={entry.ref}>
<Table.Td>{entry.title}</Table.Td>
<Table.Td>
<Group justify='space-between' gap='xs'>

View File

@ -564,9 +564,9 @@ export function SearchDrawer({
multiple
defaultValue={searchQueries.map((q) => q.model)}
>
{queryResults.map((query, idx) => (
{queryResults.map((query) => (
<QueryResultGroup
key={idx}
key={query.model}
searchText={searchText}
query={query}
navigate={navigate}