Skip to content

Commit

Permalink
Avoid "props object containing a "key" prop is being spread into JSX"…
Browse files Browse the repository at this point in the history
… error
  • Loading branch information
LukasTy committed Jun 5, 2024
1 parent a89fdb1 commit fbdb0ca
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,18 @@ function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingl
onChange={handleChange}
getOptionLabel={getOptionLabel}
renderTags={(value, getTagProps) =>
value.map((option, index) => (
<rootProps.slots.baseChip
variant="outlined"
size="small"
label={getOptionLabel(option)}
{...getTagProps({ index })}
/>
))
value.map((option, index) => {
const { key, ...tagProps } = getTagProps({ index });
return (
<rootProps.slots.baseChip
key={key}
variant="outlined"
size="small"
label={getOptionLabel(option)}
{...tagProps}
/>
);
})
}
renderInput={(params) => (
<rootProps.slots.baseTextField
Expand Down

0 comments on commit fbdb0ca

Please sign in to comment.