-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[DataGrid] Allow to customize the value displayed in the filter button tooltip #6956
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] Allow to customize the value displayed in the filter button tooltip #6956
Conversation
These are the results for the performance tests:
|
1c6c38d to
6750a5d
Compare
packages/grid/x-data-grid/src/components/toolbar/GridToolbarFilterButton.tsx
Show resolved
Hide resolved
6750a5d to
e62e81c
Compare
|
@MBilalShafi. Thank you for attention. Of course. Should I create new pull request or continue here? |
It will be better if we have it as part of this pull request so that we push this new addition tested and more usable. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
e62e81c to
cc1e3bd
Compare
ebd8fef to
ec05cb6
Compare
|
@MBilalShafi, I added an example and rebased with latest next. How can I test |
6ad3835 to
6fac285
Compare
816534c to
b7fe89a
Compare
|
@MBilalShafi, all done. |
b7fe89a to
2102b3d
Compare
9fbc4d5 to
444f4f5
Compare
m4theushw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
|
@ithrforu The Tooltip has a delay of 1 second to show up. I think you didn't wait enough while hovering it. |
|
@m4theushw, I mean I hovered filter button but "Show the source" tooltip displayed. |
|
Indeed, this PR might have some sort of regression in hover event bubbling or something along these lines. The current versions do not display |
|
@LukasTy I can also reproduce this bug in https://material-ui.netlify.app/material-ui/react-button/ so certainly is not a regression introduced by this PR but from the core. |
Hm. Good point. I tried testing a local dev run and did not see this behaviour, that's why I thought that it might have something to do with this PR, but I do not see any |
|
Can i do something? |
|
It's all good @ithrforu, I'll merge this now. |
It might have also been a desired change from MUI Core, we just weren't aware of it. But I couldn't find a recently merged PR related to it. 🤔 |

Related to #5492 (a follow-up is to fix the built-in operators)
I faced a problem with current filter values in GridToolbarFilterButton tooltip title (use DataGridPremium) and found issue with @m4theushw comment. This problem looks like:


In this PR i added the ability (from @m4theushw proposal) to specify a function to format the filter value in GridToolbarFilterButton tooltip title.