Infinite Scrolling for DataTables

UI Components for React
Post Reply
lugash
Posts: 3
Joined: 22 Sep 2021, 09:09

22 Sep 2021, 09:38

Hi,

we're looking for a way to implement infinite scrolling within a DataTable. The backend supports fetching parts of the list via pagination cursor plus amount. We managed to implement pagination but that's not what the customer wants. Lazy loading doesn't work because we don't know the actual number of records from the backend.
Is there a way to implement infinite scrolling with DataTables?

Best regards,
Lukas

ericfreeman
Posts: 3
Joined: 20 Jul 2021, 15:29

26 Sep 2021, 04:37

perhaps virtual scroll is what you need?
https://primefaces.org/primereact/showc ... ble/scroll

lugash
Posts: 3
Joined: 22 Sep 2021, 09:09

30 Sep 2021, 13:52

That looks promising, but as I understand it needs an endpoint that accepts amount and startIndex parameters. Our backend provides a cursor -- how can we integrate this with scroll?

Cheyenne
Posts: 1
Joined: 09 Oct 2021, 13:45

09 Oct 2021, 13:47

The idea of infinite scrolling means that data will be added to the table dynamically, as and when needed by the user scrolling the table. A sub-set of the data is loaded initially, and more added as needed.

https://www.skylightpaycard.us/

lugash
Posts: 3
Joined: 22 Sep 2021, 09:09

11 Oct 2021, 11:04

That's what I'm expecting, but there are multiple ways for a backend to provide paginated results: e.g. cursor based and offset based. Our backend does not support offset based. That's the problem.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests