I\'m using mat-table. It has a filter which works fine with doc example:
From https://material.angular.io/components/table/overview, the original code is:
Be aware that all fields of the class displayed in table rows, are subject to filtering, even if you do not display that field as a column.
export class City {
id: number;//is not displayed in mat table
code: string;
name: string;
country:Country;
}
Any filter for the dataSource of city table, also applies to id column, which generally we do not display to the end user.
//this filter will also apply to id column
this.cityDataSource.filter = filterValue;