react-data-table-component
react-data-table-component copied to clipboard
Change default page to 0 in pagination remote/server
In the current project I am working on, I would like to change default page in pagination remote/server to 0. So, when I clicked the next button, it starts from page 0, not page 1 like in the picture below.
It's because my API is like this:
Pages 0
Response:
Data: data, currentPage: 0, lastPage: 4
Pages 1
Response:
Data: data, currentPage: 2, lastPage: 4
Pages 2
Response:
Data: data, currentPage: 3, lastPage: 4
Pages 3
Response:
Data: data, currentPage: 4, lastPage: 4
I have tried using paginationDefaultPage={0}
but it shows error/minus pagination.