Replace chip key with non-array index

Address a lint error (rule: react/no-array-index-key) by using
chip.key prop val instead of an array index for the component key.
This commit is contained in:
Jake McDermott
2020-12-18 08:55:01 -05:00
parent 6223a78ff4
commit f09120a973

View File

@@ -279,8 +279,8 @@ function HostFilterLookup({
numChips={5} numChips={5}
totalChips={chips[key]?.chips?.length || 0} totalChips={chips[key]?.chips?.length || 0}
> >
{chips[key]?.chips?.map((chip, index) => ( {chips[key]?.chips?.map(chip => (
<Chip key={index} isReadOnly> <Chip key={chip.key} isReadOnly>
{chip.node} {chip.node}
</Chip> </Chip>
))} ))}