Skip to content

Commit

Permalink
[joy-ui][Autocomplete] Fix spread key error in test (@aarongarciah) (m…
Browse files Browse the repository at this point in the history
…ui#42776)

Co-authored-by: Aarón García Hervás <[email protected]>
  • Loading branch information
github-actions[bot] and aarongarciah authored Jun 28, 2024
1 parent 4b54e36 commit e7a451b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,14 @@ describe('Joy <Autocomplete />', () => {
renderTags={(value, getTagProps) =>
value
.filter((x, index) => index === 1)
.map((option, index) => (
<Chip key={index} endDecorator={<ChipDelete {...getTagProps({ index })} />}>
{option.title}
</Chip>
))
.map((option, index) => {
const { key, ...tagProps } = getTagProps({ index });
return (
<Chip key={index} endDecorator={<ChipDelete key={key} {...tagProps} />}>
{option.title}
</Chip>
);
})
}
onChange={handleChange}
autoFocus
Expand Down

0 comments on commit e7a451b

Please sign in to comment.