Open sotjdisc opened 6 months ago
I am uncertain whether this qualifies as a bug.
So the logic is that it runs the filter logic on the fields in the 'globalFilterFields' arrays and returns all the row that returned at least one true.
In the provided example, the ‘globalFilterFields’ attribute is set to [‘name’, ‘country.name’, ‘representative.name’, ‘status’] with the ‘notContains’ match mode. The expectation is that the first row should be filtered out because it contains the name ‘James’ in the name field. However, due to the logic searching against other fields and returning ‘true’, the row is still included. To achieve the desired behavior, consider narrowing the ‘globalFilterFields’ to only include the ‘name’ field, as follows: [globalFilterFields]=‘[‘name’]’.
This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Still persists
Describe the bug
Global filtering a table with match mode 'notContains' does not work
Environment
Reproducible at stackblitz
Reproducer
https://stackblitz.com/edit/cx2ynl?file=src%2Fapp%2Fdemo%2Ftable-filter-menu-demo.html
Angular version
17.2.2
PrimeNG version
17.10.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
Stackblitz node version
Browser(s)
Chrome 122.0.6261.112
Steps to reproduce the behavior
Type on the global search box 'James'.
Expected behavior
All rows containing 'James' must be filtered out.