-
-
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
[data grid] Hide filter item from the filter panel #16669
Comments
I agree that this behavior is a bit strange, but the UX for this would also be very weird ... since a filter is applied it will always show the indicator on the toolbar button and on filtericon in the column header. I can see 2 different solutions to this:
I'll add this to the board as an enhancement, but i would like some opinions on this from @mui/xgrid. EDIT: There is a similar issue here #16650 |
This just came to mind while working on another issue: Did you consider using a read-only filter for this @YosefSchwartz? Here is an example on the docs how this could look like: Filter non-filterable columns programmatically |
@michelengelen My data is a quite complex, and the relationship between my entities is not straightforward. The “super filter” component is something I developed outside and use the api grid context to inject the data. While using the “super filter” the data will changed according the value, but I leave the filter panel clear and allow the users to add more filters from the panel. My expected behavior is allow me as developer to hide entire FilterItem instead of just the “key”. |
Steps to reproduce
Steps:
Current behavior
Even I filter out the FilterItem, the value of the FilterItem still appears on the panel with another column as a key
Expected behavior
Filter panel should be an empty
Context
Hi!
I try to use the filterColumns function to hide FilterItems.
I take the example of initialize the filter from MUI Link to example, and add slotProps to hide rating column from filter panel.
In this example, we set a initial filter (column: rating, value :greater then 2.5) and the data are indeed filtered, but I want to hide this from the panel
In the image below you can see the the key is indeed filtered out (key “rating”), but the value is appear.
My main goal is to filter the data from initial state or external filter button (using gridApiRef and upserFilterItems), and hide from the users that filter applied.
Your environment
System: OS: macOS 15.2 Binaries: Node: 22.8.0 npm: 7.7.6 Browsers: Chrome: 133.0.6943.100 Safari: 18.2npx @mui/envinfo
Search keywords: hidding filter item from filter panel
The text was updated successfully, but these errors were encountered: