From f09120a973bda20aaf8f42e71e0107062a5c7ee1 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Fri, 18 Dec 2020 08:55:01 -0500 Subject: [PATCH] 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. --- awx/ui_next/src/components/Lookup/HostFilterLookup.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx index 862d1b0f1a..d1b15a8a06 100644 --- a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx +++ b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx @@ -279,8 +279,8 @@ function HostFilterLookup({ numChips={5} totalChips={chips[key]?.chips?.length || 0} > - {chips[key]?.chips?.map((chip, index) => ( - + {chips[key]?.chips?.map(chip => ( + {chip.node} ))}