Allow to hide the column filter from the action menu #1486
githubjakob
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, it is possible to open the column filter via the columns action menu, but it is not possible to close it from the same menu. The idea would be to allow it to close from the submenu again.
From the basic example: https://www.material-react-table.com/docs/examples/basic
The submenu allows opening the filter with the "Filter by column" item.
Once the filter is expanded, the item is greyed out.
It is possible, though, to toggle the column filters from the top toolbar.
But if enableTopToolbar is set to false, then there is no option for the user to hide the filter.
If I understand the code correctly, this is the line where it disables the menu item when the filter is open: https://github.com/KevinVandy/material-react-table/blob/a16bafe78a547c423a72eff1dd000f3875885f86/packages/material-react-table/src/components/menus/MRT_ColumnActionMenu.tsx#L204C25-L204C42
Would be happy to attempt to open a PR if this is considered useful.
Beta Was this translation helpful? Give feedback.
All reactions