DataTale scrollable lazy load - how to add more data only when the data end

UI Components for React
Post Reply
giannis
Posts: 3
Joined: 28 Jun 2023, 17:10

11 Aug 2023, 14:46

I want to add more data to the state everytime the data reach the end. There is no onScrollEnd event or something like this.
Is there a way to tell ReactPrime Datatable to accumulate data when the data reach the end.
I tried to have an offset and every time the event.last is equal to the offset to fetch more data and change the offset

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

13 Aug 2023, 17:20

isn't that virtualscroller with lazy?

https://primereact.org/datatable/#lazy_virtualscroll
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

giannis
Posts: 3
Joined: 28 Jun 2023, 17:10

14 Aug 2023, 08:48

Yes but as i can tell it constally fires to get more data in every scroll i make, there is no option to control when the next data will be loaded

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

14 Aug 2023, 13:50

I thought it only called `load` again when you reached the number of rows so if you have it set to 50 it will only call load again when you scroll to row 51.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 13 guests