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
No known key found for this signature in database
GPG Key ID: 0E56ED990CDFCB4F

View File

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