-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed as not planned
Description
Describe the bug
table.setPageCount not updating pageCount.
const table = useReactTable({
data: dataQuery.data?.rows ?? defaultData,
columns,
pageCount: 10,
state: {
pagination,
},
onPaginationChange: setPagination,
getCoreRowModel: getCoreRowModel(),
manualPagination: true,
// getPaginationRowModel: getPaginationRowModel(), // If only doing manual pagination, you don't need this
debugTable: true,
})
React.useEffect(() => {
console.log("asdfasdf");
table.setPageCount(20)
},[])
Actual result:
console.log(table.getPageCount()); // 10
Please suggest a way to change pageCount.
Your minimal, reproducible example
Not available
Steps to reproduce
1.Set pageCount=10 in useReactTableOptions
2. change pageCount somewhere outside by table.setPageCount(20)
Expected behavior
Expected result:
console.log(table.getPageCount()); // 20
How often does this bug happen?
None
Screenshots or Videos
Platform
windows 11, Chrome
react-table version
^8.8.4
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels