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] Fix order of spread props on toolbar items #15556

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

KenanYusuf
Copy link
Member

@KenanYusuf KenanYusuf commented Nov 22, 2024

Fixed the order of props being spread to toolbar items. Applying props to the individual toolbar items should take precedence over slot props applied at the root level.

Also added the ability to override badge props for GridToolbarFilterButton.

Fixes #13416
Closes #15550

@mui-bot
Copy link

mui-bot commented Nov 22, 2024

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

Generated by 🚫 dangerJS against 9dd2331

@michelengelen michelengelen added component: data grid This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature labels Nov 22, 2024
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work and removed enhancement This is not a bug, nor a new feature labels Nov 24, 2024
@KenanYusuf KenanYusuf requested a review from a team November 25, 2024 08:47
@KenanYusuf KenanYusuf added needs cherry-pick The PR should be cherry-picked to master after merge v7.x labels Nov 25, 2024
@KenanYusuf KenanYusuf merged commit d475e16 into mui:master Nov 25, 2024
29 checks passed
Copy link

Cherry-pick PRs will be created targeting branches: v7.x

onClick={showColumns}
{...rootProps.slotProps?.baseButton}
{...buttonProps}
Copy link

@marcelo-cardozo marcelo-cardozo Jan 27, 2025

Choose a reason for hiding this comment

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

hey @KenanYusuf i am seeing that this causes the showColumns function to not being called if the onClick is defined by the consumer

meaning the popover is not displayed to the user

the usecase for this would be to execute some code when the button is clicked (but the popover should still be shown)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for raising @marcelo-cardozo - I've created an issue so you can track the fix here #16354

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! needs cherry-pick The PR should be cherry-picked to master after merge v7.x
Projects
None yet
6 participants