2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-07-04 14:10:52 +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) { function fillTable(lookup: AboutLookupRef[], data: any, alwaysLink = false) {
return lookup return lookup
.filter((entry: AboutLookupRef) => !!data[entry.ref]) .filter((entry: AboutLookupRef) => !!data[entry.ref])
.map((entry: AboutLookupRef, idx) => ( .map((entry: AboutLookupRef) => (
<Table.Tr key={idx}> <Table.Tr key={entry.ref}>
<Table.Td>{entry.title}</Table.Td> <Table.Td>{entry.title}</Table.Td>
<Table.Td> <Table.Td>
<Group justify='space-between' gap='xs'> <Group justify='space-between' gap='xs'>
@@ -564,9 +564,9 @@ export function SearchDrawer({
multiple multiple
defaultValue={searchQueries.map((q) => q.model)} defaultValue={searchQueries.map((q) => q.model)}
> >
{queryResults.map((query, idx) => ( {queryResults.map((query) => (
<QueryResultGroup <QueryResultGroup
key={idx} key={query.model}
searchText={searchText} searchText={searchText}
query={query} query={query}
navigate={navigate} navigate={navigate}