How to limit the row of table being shown?
Is there a way to limit the rows being shown in my website? The problem I have is the default value rows i
10
, it is possible to limit it to 5
? I'm following this tutorial provided by shadcn-ui
https://github.com/shadcn-ui/ui/blob/main/apps/www/app/(app)/examples/tasks/components/data-table-pagination.tsxGitHub
ui/apps/www/app/(app)/examples/tasks/components/data-table-paginati...
Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source. - shadcn-ui/ui
2 Replies
flat-fuchsia•17mo ago
Did you try setting
pageSize
like in this example? https://github.com/TanStack/table/discussions/2029#discussioncomment-4860455GitHub
How to set default page size? · TanStack table · Discussion #2029
Hi, How can I initially set default page size to be 15?
magic-amberOP•17mo ago
It works, but I have a problem, the
rows per page
doesn't work anymore once I set it.
oh nevermind, I just didn't type it properly, Thanks a lot ~~!!