PrimeReact - Problem with data table and lazy loading

UI Components for React
Post Reply
Posts: 8
Joined: 06 Mar 2023, 11:35

07 Mar 2023, 11:04

I have a problem with DataTable and lazy loading. When I activate the lazy loading paramater (which i can't remove because the request from the api is too big) the filtering and sorting does not work when the lazy loading is activated. I understand why it works like that, but I really have no idea how to fix it. I made some modifications with the base exemple in primereact like adding lazy loading, removing paggination and replace it by virtual scrolling. I also made a modification with the filtering but I think that what I did is not really correct, but it works in that case : it stops the lazy variable and therefore I can use lazy loading. What I would love to do is to sort already loaded data in the table. Help will be appreciated. MyHealthOnline
Last edited by Shannonmaus on 09 Mar 2023, 06:18, edited 1 time in total.

Posts: 3532
Joined: 22 Apr 2013, 15:48

07 Mar 2023, 19:19

That is now how "lazy" works. It hands over the filtering, sorting, paging etc to your API so you have full control.

I have a fully working demo using real REST services and database of Lazy table here:
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile:
PrimeFaces Elite 12.0.0 / PF Extensions 12.0.3
PrimeReact 8.7.3

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest