material-react-table icon indicating copy to clipboard operation
material-react-table copied to clipboard

Pagination pageIndex automatic upadate value 0 while pass param in setRowCount.

Open MrAbhishekSingh opened this issue 2 years ago • 2 comments

material-react-table version

^2.0.0

react & react-dom versions

^18.2.0

Describe the bug and the steps to reproduce it

when we are pass param in setRowCount pageIndex value automatic update 0

Minimal, Reproducible Example - (Optional, but Recommended)

My current project

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms

  • [X] I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

MrAbhishekSingh avatar Dec 18 '23 18:12 MrAbhishekSingh

hey any updates on this issue, facing the same :cry:

smartdeepp avatar Apr 11 '24 04:04 smartdeepp

... const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 10, }); pagination page no and page size add like this pagination: { PageNo: pagination.pageIndex + 1, PageSize: pagination?.pageSize, }, and in table onPaginationChange: setPagination, state: { showProgressBars: loading, isLoading: loading, pagination, },

MrAbhishekSingh avatar Apr 11 '24 04:04 MrAbhishekSingh