FilterUtils.filter only accepts filterValue of type string #8348
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-svm8kf
Current behavior
Cannot call FilterUtils.filter(...) and pass a filterValue of anything other than a string type.
Cannot use filterMatchMode 'in' because an array of values cannot be provided.
Expected behavior
FilterUtils.filter(...) will accept a filterValue of any type. FilterUtils.filter(...) will pass filterValue to appropriate filterMatchMode (in) to filter the set.
Minimal reproduction of the problem with instructions
const filtered = FilterUtils.filter(this.cars, ['make'], ['Audi', 'BMW'], 'in');
What is the motivation / use case for changing the behavior?
Using existing filtering for custom component to determine result of filters.
Use the same set of filters currently applied to a p-table => apply those filters to a custom component
Please tell us about your environment:
Windows, VS Code, npm, express
Angular version: 8.0
PrimeNG version: 8.1.1
Browser: [all ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
The text was updated successfully, but these errors were encountered: