I\'m using angular material in my project and I\'m using Mat-Table to render 1000 Product/row per table. When Change pagination (we use backend pagination) of table to 1000
I have found the paginator and sort to sometimes not work.
What has worked for me with over 2000 rows was:
ngAfterViewInit() {
setTimeout(() => {
this.getLargeDataSet.subscribe(largeDataSet => {
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
this.dataSource.data = largeDataSet;
});
});
}
Supper fast, from 10+sec to 2sec :0