Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] Add key prop to GridFilterInputMultipleValue #14302

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Aug 23, 2024

Closes #14299

@sai6855 sai6855 marked this pull request as draft August 23, 2024 10:03
@sai6855 sai6855 changed the title [DataGrid] Add key [DataGrid] Add key prop to GridFilter Aug 23, 2024
@sai6855 sai6855 added the component: data grid This is the name of the generic UI component, not the React module! label Aug 23, 2024
@mui-bot
Copy link

mui-bot commented Aug 23, 2024

Deploy preview: https://deploy-preview-14302--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 54252b9

@sai6855 sai6855 changed the title [DataGrid] Add key prop to GridFilter [DataGrid] Add key prop to GridFilterInputMultipleValue.tsx Aug 23, 2024
Comment on lines +68 to +79
value.map((option, index) => {
const { key, ...tagProps } = getTagProps({ index });
return (
<rootProps.slots.baseChip
key={key}
variant="outlined"
size="small"
label={option}
{...tagProps}
/>
);
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is taken from

renderTags={(value, getTagProps) =>
value.map((option, index) => {
const { key, ...tagProps } = getTagProps({ index });
return (
<rootProps.slots.baseChip
key={key}
variant="outlined"
size="small"
label={getOptionLabel(option)}
{...tagProps}
/>

@sai6855 sai6855 marked this pull request as ready for review August 23, 2024 10:23
@sai6855 sai6855 changed the title [DataGrid] Add key prop to GridFilterInputMultipleValue.tsx [DataGrid] Add key prop to GridFilterInputMultipleValue Aug 23, 2024
@michelengelen michelengelen added the bug 🐛 Something doesn't work label Aug 23, 2024
@MBilalShafi MBilalShafi changed the title [DataGrid] Add key prop to GridFilterInputMultipleValue [DataGrid] Add key prop to GridFilterInputMultipleValue Aug 29, 2024
Copy link
Member

@MBilalShafi MBilalShafi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Warning: A props object containing a "key" prop is being spread into JSX
4 participants