I am using Material Table on my Angular 7 project.
I have a table that displays several objects.
Each object has a property 'number of promotions' and i would like to filter this table using numbers ranges (under 5, from 6 to 10, from 11 to 20, more than 20).
Here is an example of the dataSource.filterPredicate I used to have custom filters on my table but i don't get how to manage the one i explained earlier...
this.dataSource.filterPredicate = (data: Store, filter: string) => {
switch (this.filterCriteria) {
case 'approval':
if (filter === 'null' || filter === '') {
return (data);
} else {
return (data.approval.trim().toLowerCase().indexOf(filter) !== -1
);
}