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

solid-virtual: UI not updating when count changes in createVirtualizer parameters #661

Open
2 tasks done
rrajaste opened this issue Feb 4, 2024 · 3 comments
Open
2 tasks done

Comments

@rrajaste
Copy link

rrajaste commented Feb 4, 2024

Describe the bug

UI doesn't update when changing the count signal passed as a parameter to virtualizer

Your minimal, reproducible example

https://codesandbox.io/p/devbox/solidjs-tanstack-virtual-forked-67sdkh?file=%2Fsrc%2FApp.tsx%3A14%2C6&workspaceId=2c68d57c-2197-4b47-923d-3e4f5f971951

Steps to reproduce

Change the value inside "Row count" input on top of the list to update the count signal

Expected behavior

Virtualizer should update UI to render the correct count for rows.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Code sandbox

tanstack-virtual version

v3.0.4

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.
@rrajaste rrajaste changed the title solid-virtual: UI not updating when "count" changes in virtualizer parameters solid-virtual: UI not updating when "count" changes in createVirtualizer parameters Feb 4, 2024
@rrajaste rrajaste changed the title solid-virtual: UI not updating when "count" changes in createVirtualizer parameters solid-virtual: UI not updating when count changes in createVirtualizer parameters Feb 4, 2024
@barsikus007
Copy link

@barsikus007
Copy link

@rrajaste, I found solution: use get count() {return signal()} instead of count: signal()

btw this at least should be mentioned in docs

@rrajaste
Copy link
Author

Thanks for the workaround, it seems to fix the issue. Although I think something like this should be hidden under the interface of createVirtualizer. Perhaps count should be a function in the createVirtualizer interface?

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