virtual icon indicating copy to clipboard operation
virtual copied to clipboard

Reach browser max height pixels

Open hyanmandian opened this issue 2 years ago • 2 comments

Describe the bug

I'm doing some POC to check if I'll be able to render a larger list and I face some issues with the current approach you use by setting the height of the parent element to create the scrollable area. If the list size is long it could beat the max height value which is:

Firefox: 33554400px
Chrome:  33554428px

https://stackoverflow.com/questions/16637530/whats-the-maximum-pixel-value-of-css-width-and-height-properties

In that way is impossible to keep scrolling until the end of the list

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/romantic-breeze-tjpnxm?embed=1&file=%2Fsrc%2Fmain.tsx%3A4%2C21

Steps to reproduce

  • Create a list with 1677723 items and each item should have 20px
  • Cannot scroll to see the last item

Expected behavior

  • Create a list with 1677723 items and each item should have 20px
  • Be able to see the last item

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

macOS - Chrome

tanstack-virtual version

3.0.0-alpha.1

TypeScript version

No response

Additional context

No response

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.

hyanmandian avatar Oct 24 '23 19:10 hyanmandian

@hyanmandian I've managed to solve this problem by implementing custom scrollbar described in this article.

https://dev.to/kohii/how-to-implement-virtual-scrolling-beyond-the-browsers-limit-16ol

acherkashin avatar Jun 22 '25 19:06 acherkashin

@acherkashin Wow, that’s awesome, thanks for sharing! 🙌 Would you be open to sharing your solution? I’d be happy to accept a PR with an example if you’re up for it.

piecyk avatar Jun 23 '25 13:06 piecyk