-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Hide columns in Datagrid based on filters values OR on action buttons #1965
Comments
Can you describe the use case? I don't understand the relationship between filters and visible columns. |
@fzaninotto You are right, i should not have mentioned See the use case here, I do the same in another dashboard (not using Depending on the value there, I either show "All" columns or a subset of them. I believe you can be inspired better than me on how this could work with the Thanks! |
Right, so the filters aren't designed for that use case. I suggest you create a custom So it's doable in React, and we won't support it via filters in the core. I'm closing this issue as "wontfix". Thanks for the suggestion, though! |
@fzaninotto It worked, the only "issue" is that it does not render when conditionally rendering the
I just have a new If you have the time to comment, this is the only obstacle we have to overcome to re-render the filtered columns without changing the react-admin core. Maybe it is something simple on our end? Thanks. UPDATE: Eventually, adding a |
@afilp Maybe this would work for you ? https://github.com/fizix-io/ra-customizable-datagrid |
@afilp you could try to replace |
Is your feature request related to a problem? Please describe.
We need to dynamically show/hide the columns of a List Datagrid based on the filters values OR custom action buttons
Describe the solution you'd like
Not sure how this could be better, just a suggestion:
It was suggested by @djhi to add it as an enhancement request here.
This is the related SO question:
https://stackoverflow.com/questions/50861029/how-to-hide-columns-in-datagrid-based-on-filters-values
The text was updated successfully, but these errors were encountered: