-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Changing GridToolbarFilterButton
variant
#10409
Comments
Hi @SammyGutierrez335 - <GridToolbarFilterButton variant="outlined" />
+ <GridToolbarFilterButton componentsProps={{ button: { variant: 'outlined' } }} /> The filter button is wrapped with the tooltip, so the props are a bit different. |
We can improve the consistency in v7. |
GridToolbarFilterButton
variant
Thank you! That took care of the outlining/error issue. As mentioned, now there is a tooltip exclusively only on this button which is not ideal but at least the buttons look uniform. Thanks again. You all are awesome! |
The decision is to:
- <GridToolbarFilterButton title="Custom tooltip title" />
+ <GridToolbarFilterButton slotProps={{ tooltip: { title: "Custom tooltip title" } }} /> |
Duplicates
Latest version
Steps to reproduce 🕹
Steps:
snippet of actual code in my project
Current behavior 😯
The Typescript compiler/IDE highlights the 'variant' prop on the GridToolbarFilterButton as an invalid prop but renders correctly. Changing the variant prop will change the look of the button as expected.
The other buttons in this custom toolbar also contain the same variant prop but do not throw an error
Expected behavior 🤔
I expect the GridToolbarFilterButton to act like the other buttons and accept the variant prop without triggering Typescript compiling error or for the data grid component to reject the prop (and varient changes) if it truly is an invalid prop.
Context 🔦
I am implementing a data grid to show various user data to supervisors.
I would like all buttons to share the same 'outlined' styling/hover effects (leveraging the prop) but if I do, the typescript error throw will impact development because each time my application renders I am forced to close out the error. This is also a block from running a build because my typescript config is setup to prevent it. My work around is to remove the prop during development/building and just informing my team that mismatch styling will hopefully be addressed later.
Your environment 🌎
npx @mui/envinfo
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: