-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
"Clear all filters" on gridMenu wipes out filter conditions #4657
Comments
I don't understand the issue here. |
Thank you for looking at my report. I expect "Clear all filters" will clear all search terms for all filters while keeping their conditions intact. Otherwise the behavior of filtering function will be changed after executing "Clear all filters". For example, my test case in the plnkr link has 3 entries:
and the id column is defined as { field: 'id', filter: {condition: uiGridConstants.filter.ENDS_WITH}} If I type 2 in the filter field, only the second item (id=112) is displayed. After executing the command, however, both the second (id =112) and third (id= 211) items are displayed when I type 2 in the filter. It is because the condition is removed by the command, which is not expected. |
The problem is in ui-grid-menu-button.js where we call In Grid.js (and in I don't know if that behaviour is the desired logic or maybe an error, but I have to admit I see no point in clearing conditions set by the devs. If you feel like you can propose a PR to change said behaviour and the team will decide whether to accept it or not. Sadly I think there is no way to remove that specific menu button when filtering is enabled. |
It will be appreciated if you can tell me where I can submit the PR? Thanks, |
You can start reading the files:
You can find them at the root folder of source code. |
I will read the documents and submit the PR. Thank you very much. |
I've created PR #5361, and all tests pass, but still not sure why the original source cleared |
Hi, |
"Clear all filters" on gridMenu wipes out filter conditions as shown in the test:
http://plnkr.co/edit/7O9OkqFHoVmzHx3OiAH2
The conditions are printed to console when typing in a filter field. Can I remove "Clear all filters" on gridMenu (as a workaround)?
The text was updated successfully, but these errors were encountered: