Multiple Filter on mat-table Angular Material 6

2019-08-23 02:43发布

I have seen solution in Multiple Filters on MatTable. But I have (scrolled) method on MatTable where on Scroll I push data on MatTableDataSource.

For example:

  this.currentPage += 1;
    this.apiService.getData(this.currentPage).subscribe(results => {
      for (let i = 0; i < results.length; i++) {
        this.data.push(results[i])
      }
      this.dataSource = new MatTableDataSource(this.data);
});

Method customFilterPredicate don't work on scrolled because new MatTableDataSource has data which is not filtered. Can someone help me ?

0条回答
登录 后发表回答