I have a standard data-table from shadcn

How do I limit the number of rows displayed in every pagination?
2 Replies
Roy
Roy10mo ago
When you pass the columnFilters and columnVisibility state into the useReactTable hook, you can also pass a value for pagination like this { pageIndex: number, pageSize: number } which controls the pagination information. It might be more useful in your case to pass a value to the options called initialState like this { pagination: { pageIndex: 0, pageSize: 25 } }, so that this state is not controlled and can still be managed internally.
BootesVoid
BootesVoidOP10mo ago
Thanks a lot!
Want results from more Discord servers?
Add your server