-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
virtualizer.getVirtualItems() return zero items for vanilla js project #699
Comments
same problem on safari |
@Dugnist you need to call virtualizer._willUpdate() that will register scroll events and rect size detection. |
I'm using solid, I had the same problem when I tried to update the package, so I went back to the one I was using until then, 3.0.0-beta.6, and it works perfectly. Waiting to find out why. |
having same problem on a nextJs project with latest version (3.5.1) |
@lucjdo can you create simple stackblitz example? |
I used |
Describe the bug
I need to implement virtual list in vanilla js.
I used this approach:
No matter what I do, the array of items is always empty. But virtualizer.measurementsCache.length === 10000.
Your minimal, reproducible example
https://codepen.io/Dugnist/pen/LYveoXQ
Steps to reproduce
3
Expected behavior
const items = virtualizer.getVirtualItems()
should return array with more than zero itemsHow often does this bug happen?
None
Screenshots or Videos
No response
Platform
codepen
tanstack-virtual version
[email protected]
TypeScript version
vanilla js
Additional context
No response
Terms & Code of Conduct
The text was updated successfully, but these errors were encountered: