table
table copied to clipboard
`Infinity` is not supported for pageSize
TanStack Table version
8.17.3
Framework/Library version
React 18
Describe the bug and the steps to reproduce it
{[10, 20, 30, 40, 50, Infinity].map(pageSize => (
<option key={pageSize} value={pageSize}>
Show {pageSize}
</option>
))}
selecting the Infinity causes some infinite loop and crashes the tab.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://codesandbox.io/p/devbox/cool-bose-tj55js?file=%2Fsrc%2Fmain.tsx%3A206%2C1-207%2C1
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] 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.
You can do that if you want. In the onChange handler, just have some logic that sets manual pagination to true to turn off pagination logic in that situation.
I was rather wondering to support that without manual pagination. That said with the native one.
How about using Number.MAX_SAFE_INTEGER
That is not an infinity tho.