joaocarmo/react-smart-data-table

How to render server side pagination?

chetanwaghfx opened this issue · 5 comments

How to render server side pagination?

@chetanwaghfx can you please elaborate on your question?

Currently, all the records are being retrieved in one go and they are managed to display using Pagination links. I want to call one page at a time from the server when pagination link is clicked. What if the number of records is too large?
All I am looking for is server-side rendering for pagination.

@chetanwaghfx ,

For server-side pagination, you need to construct your own pagination logic and render the table for every new request.

Currently, the RSDT doesn't support this but will add it to the future enhancements.

I just released v0.7.0 which allows for a custom pagination component. Maybe you can use this new feature to render the server side pagination.

After some consideration, I believe it's outside the scope of this library and can be implemented with a custom pagination element that triggers the change of the data prop to a new url. The caveat is that the pagination state must be managed within the app and outside this library.