Skip to content
Discussion options

You must be logged in to vote

This is

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?

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 } }

Replies: 1 comment

Comment options

You must be logged in to vote
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
Labels
None yet
2 participants