-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Table: Advance Filtering is broken #15804
Table: Advance Filtering is broken #15804
Comments
This bug was created when issue #15557 was attempted to be fixed by PR #15594. The issue of clearing the filters when a user doesn't apply the filter is very complicated. I have known about this PrimeNG issue for multiple years and believed there was no straight forward fix. i have spent a few hours trying to see if i could improve the changes introduced by PR #15594 and have failed to find a solution that both fixes this issue #15804 and at a minimum partially fixes #15557. The problem is that there are more than one advance filter (strings, date, multi-select, ...) and they all work slightly differently. Also, there are APIs provided by PrimeNG table that allow a developer to programmatically clear/reset filters. I believe the best short term solution is to just revert the changes made in PR#15594 until a "real" expert can fix this functionality. |
I just reviewed issue: Component: Table (Advanced Filter) #15778. It's similar to the this issue, but not identical. I also confirmed that the problem was caused by the changes made to PR#15594 |
Hello, I'm currently looking into this and I think I have a rough solution but would be great to hear your thoughts. |
Describe the bug
Advance table filters that have been "previously" applied are automatically cleared when a user starts a filter dialog overlay and then closes the filter dialog by clicking outside of the dialog overlay.
The Video listed below demonstrates the issue using the current PrimeNG Advance Filter demo (https://primeng.org/table#filter-advanced):
advanceFiltersAutomaticallyCleared.mov
This issue was introduced with the closing of issue #15557 by PR #15594
The changes that were made for PR #15594 failed to take into account a filter may have already been previously defined before the filter dialog is "relaunched" and then closed without making any changes to the filter.
With Advance Table Filters, the actual "filter rule" is not visible. The only way for a user to see how a column filter is set is to display the column filter dialog. The user may not want to make any changes or "reapply" the current filter. This is a very common use case in my application.
Environment
max and windows
Reproducer
https://primeng.org/table#filter-advanced
Angular version
17.x
PrimeNG version
17.18.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18
Browser(s)
chrome, ff, safari
Steps to reproduce the behavior
Expected behavior
After step 4, the filter should not be cleared and the table rows should remain filtered
The text was updated successfully, but these errors were encountered: