2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-07-04 06:00:38 +00:00

[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
2 changed files with 4 additions and 4 deletions
@@ -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'>
@@ -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}