Skip to content

Commit

Permalink
[base-ui] Fix React spread key warning in test (#42744)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah authored Jun 24, 2024
1 parent 968a400 commit 00c1b90
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ describe('useAutocomplete', () => {
{groupedOptions.length > 0 ? (
<ul {...getListboxProps()}>
{groupedOptions.map((option, index) => {
return <li {...getOptionProps({ option, index })}>{option}</li>;
const { key, ...optionProps } = getOptionProps({ option, index });
return (
<li key={key} {...optionProps}>
{option}
</li>
);
})}
</ul>
) : null}
Expand Down

0 comments on commit 00c1b90

Please sign in to comment.