Svelte 5 support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.1k
- Forks
- 466
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 13
Description
Describe the bug
It's working fine in Svelte 4. I'm currently trying out the library in Svelte 5 and found my use case doesn't work.
I got an empty table with the same code. I suspect it cannot keep track of the initial element binding of the scroll element, because it works if I manually make a mounted state and call $virtualizer._willUpdate().
Your minimal, reproducible example
https://www.sveltelab.dev/github.com/rayrw/svelte5-tanstack-virtual
Steps to reproduce
I've made a minimal reproduction repo.
Please note that we have to manually run npm i --force && npm run dev before #863 is merged.
With the hack from L19-L27, it seems to work. However, when I commented out it, I got an empty table.
I suspect it cannot keep track of the initial element binding of the scroll element?
Expected behavior
I hope we can get rid of the manual mounting/element binding check and call of $virtualizer._willUpdate().
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
macOS, Arc browser Version 1.65.0 (54911)
Chromium Engine Version 130.0.6723.59
tanstack-virtual version
3.10.8
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Svelte 5 minimal reproduction and run npm i --force && npm run dev; inspect the workaround in L19-L27 and the use of $virtualizer._willUpdate(). Compare the behavior with and without the manual mounting and element-binding check, and consider the issue resolved when the table renders in Svelte 5 without that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100