PaginationState #4337
Answered
by
mukul-vm
Ali-Hussein-dev
asked this question in
General
PaginationState
#4337
-
I want to customize the default page size so I did that const table= useReactTable({
//...
state: {
pagination: { pageSize: 20, pageIndex: 0 },
},
})
// ... but the next page and previous page buttons stop working. What happened? |
Beta Was this translation helpful? Give feedback.
Answered by
mukul-vm
Sep 21, 2022
Replies: 1 comment
-
This is
This is because you are fixing the state of the table to pageSize: 0 and pageIndex: 0. Instead of state you should use initialState. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Ali-Hussein-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is
This is because you are fixing the state of the table to pageSize: 0 and pageIndex: 0. Instead of state you should use initialState.
e.g.
initialState: { pagination: { pageSize: 20, pageIndex: 0 } }