how many rows to load every lazy load virtual scroll datatable primeNG

how many rows to load every lazy load virtual scroll datatable primeNG

DiniDini Posts: 2Questions: 2Answers: 0
edited November 2018 in Free community support

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.

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    Have you got server-side processing enabled? Can you link to a page showing the issue please, per the forum rules.

    Allan

This discussion has been closed.