PrimeReact, React. Wrong displaying template preview (Skeleton) for infinity lazy loading scrollbar

87 views Asked by At

I found not correct lazy scroll working. This is default example from manual https://primereact.org/datatable/#lazy_virtualscroll and it sandbox https://codesandbox.io/s/55lsf2

Problem conclude is: when you scrolling down then for current items should be added Skeleton records template, but in example (current implementation) it hide all records during loading and display skeleton only for first set of records.

I recorded video with behavior https://www.youtube.com/watch?v=kpRCQCFJEEU&ab_channel=Y

FYI I am expect the same behavior https://codesandbox.io/s/y7lm45?file=/src/Demo.tsx

BTW if we check example with native lazy virtual scroller component https://primereact.org/virtualscroller/#lazy so it works well!

I am totaly confused with mixing DataTable and virtualScrollerOptions enter image description here As example we can pass target items into 2 properties enter image description here or use appendOnly to add items for existing items to avoid removing all items and reach target behavior.

Also we don't have any onFetchRows event that I can use... I don't know, looks like I need manually add records with loading template according isLoading Flag at lazyLoad event firing and when loading will over, toggle isLoading flag and update itemTemplate for newly records (just switch keleton to usuall mark up for fethed records)

0

There are 0 answers