Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement server-side pagination with TanStack Table and trigger data fetch on page change?

I am trying to implement server-side pagination using TanStack Table in my Next.js project. I have followed the instructions provided in the TanStack Table documentation. The table is displaying correctly, but I am having trouble figuring out how to trigger the data fetch when the "Next" or "Previous" button is pressed.

like image 274
hantoren Avatar asked Nov 14 '25 10:11

hantoren


1 Answers

I would recommend you take a look at this project that uses Shadcn Data Table component: https://github.com/sadmann7/shadcn-table

The pros of using this table is that it has server side pagination enabled, has advanced filters, and can be customized according to your needs.

like image 99
omzesha Avatar answered Nov 17 '25 08:11

omzesha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!