Skip to content

Commit

Permalink
Provide a unique key to each autosuggest category item so it rerenders
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Apr 19, 2024
1 parent 0180036 commit 3ed3875
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AutosuggestCategory: FC<AutosuggestCategoryProps> = ({
"autosuggest__text-item--highlight": highlightedIndex === index
}
)}
key={item.term + (item.work?.workId || "")}
key={`${item.term}-${index}`}
{...getItemProps({ item, index })}
data-cy={dataCy}
>
Expand Down

0 comments on commit 3ed3875

Please sign in to comment.