-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Quick Filter is not correctly applied to dynamically added columns #12509
Comments
Hey @Zitrooone, |
FYI: You can still use the visibility model and remove the hidden column from the visibility panel. It is explained in more detail in this comment Would that work for you? |
Hey @michelengelen, thanks for your help! Is there a way for me to see the grid board to track status? |
I think you might have misunderstood what i was trying to suggest. Would that work for you? |
You are correct, I did misunderstand your suggestion. The usage of the slot props is a nice addition I did not know about, thank you! After all, the issue is fairly minor to me. Simply retyping the search term or even removing one character will then apply the filter correctly again. I appreciate your help! |
OK, Got it! |
Steps to reproduce
Link to live example: (required)
https://codesandbox.io/p/sandbox/quick-filter-example-n2znvw
Steps:
Current behavior
In the regular grid, the column "name" displays the name.
In the tree data grid, the column "group" displays the name.
Switching from non tree data to tree data correctly applies the quick filter.
Switching back does not produce a match on the column "name" after it was added dynamically.
When searching for something found in the "balance" column, everything works fine.
Expected behavior
After switching from tree data to non tree data, I expect the quick filter to be applied to any columns I provide to the grid.
Context
I've built the codesandbox to accurately reproduce the environment I'm working with. I know it might be an unconventional way of hiding columns, but let me explain.
We have a number of varying grids, that all allow the user to adjust column visibility as well as other grid settings. These settings are then stored in local storage.
For storing the grid settings we have one generalised function that is used in the different grids.
In this example, the name column is removed because it would be a duplicate of the data found in the grouping column. Working with the visibility model is not ideal due to our generalised storage function. Besides, this would allow the user to enable a column that has no meaning in the given context.
I am curious to know whether this is a fundamental flaw with our architecture, or whether this could be fixed in the library.
I tried it in the latest version of Chrome (122.0.6261.129) and Firefox (123.0.1).
Your environment
npx @mui/envinfo
Search keywords: quick filter data grid pro
The text was updated successfully, but these errors were encountered: