Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinity is not supported for pageSize #5559

Open
2 tasks done
simPod opened this issue May 16, 2024 · 2 comments
Open
2 tasks done

Infinity is not supported for pageSize #5559

simPod opened this issue May 16, 2024 · 2 comments

Comments

@simPod
Copy link

simPod commented May 16, 2024

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

  • 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.
@KevinVandy
Copy link
Member

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.

@simPod
Copy link
Author

simPod commented May 16, 2024

I was rather wondering to support that without manual pagination. That said with the native one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants