mirror of
https://github.com/ansible/awx.git
synced 2026-03-21 19:07:39 -02:30
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:
@@ -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>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user