I am trying to filter an Angular Material mat-table for a column that only contains boolean. I read here that datasource.filterPredicate can be used to filter the collection but I found out that the call uses a string parameter. Here is my code so far
this.dataSource.filterPredicate = (data: T, filter: boolean) => !filter || data.isCompleted== filter;
I also tried the following but nothing happens
this.dataSource.filteredData.filter(f => f.isCompleted== filter);
How can I filter the datasource based on a boolean column?
Thanks