primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Wrong displaying template preview (Skeleton) for infinity lazy loading scrollbar

Open djuuuuus opened this issue 3 years ago • 3 comments

Describe the bug

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

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

I am totally confused with mixing DataTable and virtualScrollerOptions image As example we can pass target items into 2 properties image 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)

Reproducer

https://codesandbox.io/s/55lsf2

PrimeReact version

10.0.5

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

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

Expected behavior

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

djuuuuus avatar Oct 23 '23 12:10 djuuuuus

I have the same problem. Maybe there's a way to turn off loading skeleton manually?

adrianmarpl avatar Dec 20 '23 11:12 adrianmarpl

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Dec 15 '24 01:12 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

github-actions[bot] avatar Dec 23 '24 01:12 github-actions[bot]