I have an angular material table with a custom filtering:
ngOnInit(): void {
this.dataSource.filterPredicate = (u: Underlying, f: string) =>
this.activeUnderlyings.indexOf(u.symbol) > 0
&& defaultFilter(u, f);
}
applyFilter(event: Event) {
const filterValue = (event.target as HTMLInputElement).value;
this.dataSource.filter = filterValue.trim().toLowerCase();
}
No matter what filter word is set or if it's not set at all, the items should always be filtered by this.activeUnderlyings.indexOf(u.symbol) > 0
. However, the filtering is obviously only triggered, when this.dataSource.filter
is set.
Is there a way to manually activate filtering?