Following this sample I know I can write my own this.dataSource.filterPredicate
. This works fine as long as I search for a string. I want to filter additionally according to a used state
(=myFilterState
).
I try to use the predicate like
this.dataSource.filterPredicate =
(data: MyElement, filter: string) => data.myType.useState === this.myFilterState;
The problem I'm facing is that when I change this.myFilterState
the filter is not reevaluated until I change the string of the filter
. As long as the filter
remains empty the filterPredicate
is not triggered.
Is there a way to trigger it manually - despite the value of filter
?