1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

fix duplicate variable and key usng array index issues

This commit is contained in:
John Mitchell 2020-07-28 15:45:03 -04:00
parent 5ffc2e4188
commit 2229d43e8b
2 changed files with 3 additions and 3 deletions

View File

@ -134,8 +134,8 @@ function AdvancedSearch({
onCreateOption={setKeySelection}
maxHeight="500px"
>
{allKeys.map((optionKey, i) => (
<SelectOption key={`${i}.${optionKey}`} value={optionKey}>
{allKeys.map((optionKey) => (
<SelectOption key={optionKey} value={optionKey}>
{optionKey}
</SelectOption>
))}

View File

@ -325,7 +325,7 @@ class Search extends React.Component {
search column so the chips show up */}
{Object.keys(chipsByKey)
.filter(val => chipsByKey[val].chips.length > 0)
.filter(val => columns.map(val => val.key).indexOf(val) === -1)
.filter(val => columns.map(val2 => val2.key).indexOf(val) === -1)
.map(leftoverKey => (
<ToolbarFilter
chips={