how many rows to load every lazy load virtual scroll datatable primeNG
how many rows to load every lazy load virtual scroll datatable primeNG
Dini
Posts: 2Questions: 2Answers: 0
I use datatable PrimeNG with virtual scroll.
when I scroll, the table doesn't display all the rows i have loaded.
Maybe I have a problem in my code?
this is my code:
loadLazy(event: LazyLoadEvent) {
this.filters = event.filters;
this.loading = true;
setTimeout(() => {
this.loading = false;
if (this.displayList) {
let list = this.displayList.filter(row => this.filterField(row, event.filters));
this.displayList1 = list.slice(event.first, (event.first + event.rows));
this.totalRecords = list.length;
}
}, 250);
}
the view:
before scroll:
after scroll:
I have more rows than displayed rows.
This discussion has been closed.
Answers
Have you got server-side processing enabled? Can you link to a page showing the issue please, per the forum rules.
Allan