primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Issue with table that has virtual scrolling and lazy loading

Open monkey-jhe opened this issue 3 years ago • 2 comments

Describe the bug

In the demo table for virtual scrolling with lazy loading the table doesn't always trigger the lazy load event properly.

Environment

.

Reproducer

https://stackblitz.com/edit/primeng-tablevirtualscroll-demo-ptfsgv?file=src/app/app.component.html

Angular version

15.1.0

PrimeNG version

15.1.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.13.2

Browser(s)

No response

Steps to reproduce the behavior

  1. Jump to a lower part of the table (quickly drag the scrollbar) so that many virtual pages are above and below the newly loaded data
  2. Wait for the loading to finish
  3. Scroll up to trigger the lazy loading and wait for it to finish multiple times
  4. After 2-5 times of triggering the lazy loading it gets stuck loading data and doesn't trigger the lazy loading event

Expected behavior

When you jump to a lower part of the table the lazy loading event should be triggered properly every time you scroll past a certain amount of rows.

monkey-jhe avatar Jan 24 '23 15:01 monkey-jhe

I noticed the same problem. It can easily be reproduced in the official current Stackblitz example by changing scrollHeight to something like 750px.

Scrolling down fast using the scrollbar, you can see at the border of a lazy-load block of 100 that the skeleton is waiting to be filled with entries but the lazyLoadEvent only triggers for the skeleton-rows if you scroll further up (in the middle of the empty 100-element block). But thats too late.

JohannesBeiserSG avatar Apr 30 '24 09:04 JohannesBeiserSG

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

mertsincan avatar Nov 19 '24 14:11 mertsincan