我在用垫子表 https://run.stackblitz.com/api/angular/v1?file=app%2Ftable-filtering-example.ts。它有一个过滤器,工作正常。
针对以下数据进行过滤(所有列)
const ELEMENT_DATA: Element[] = [
{position: 14598, name: 'Hydrogen', weight: 1.0079, symbol: 'H'},
{position: 24220, name: 'Helium', weight: 4.0026, symbol: 'He'},
{position: 39635, name: 'Lithium', weight: 6.941, symbol: 'Li'},
{position: 42027, name: 'Beryllium', weight: 9.0122, symbol: 'Be'},
{position: 53216, name: 'Boron', weight: 10.811, symbol: 'B'},
{position: 60987, name: 'Carbon', weight: 12.0107, symbol: 'C'},
{position: 70976, name: 'Nitrogen', weight: 14.0067, symbol: 'N'},
{position: 81297, name: 'Oxygen', weight: 15.9994, symbol: 'O'},
{position: 90975, name: 'Fluorine', weight: 18.9984, symbol: 'F'},
{position: 18879, name: 'Neon', weight: 20.1797, symbol: 'Ne'},
{position: 11209, name: 'Sodium', weight: 22.9897, symbol: 'Na'}
];
但现在我正在尝试更改过滤器,因为我想要的过滤器只是用于"position", "name", "symbol"
柱子。我已经经历过这个例子但是在 Angular 5 中过滤 Angular Material 表中的特定列 https://stackoverflow.com/questions/48276404/filtering-specific-column-in-angular-material-table-in-angular-5.
我不明白请帮助我
StackBlitz 代码 https://stackblitz.com/edit/angular-z17v3j-o8y43u?file=app%2Ftable-filtering-example.ts