Dynamically updating count seems to not trigger an update
See original GitHub issueDescribe the bug
When dataCount changes from 0 to 1000, the list is not updated.
const rowVirtualizer = useVirtualizer({
count: dataCount,
getScrollElement: () => tableContainer.current,
estimateSize: () => 21,
overscan: 5
});
Your minimal, reproducible example
https://codesandbox.io/s/react-virtual-only-one-item-is-rendered-at-first-bfoj5r?file=/src/main.tsx
Steps to reproduce
Checkout following sandbox:
https://codesandbox.io/s/react-virtual-only-one-item-is-rendered-at-first-bfoj5r?file=/src/main.tsx
At first glance only one row will be visible. This is because on first render dataCount is 0, but then it changes to 1000, but the list is not updated.
Expected behavior
All items, which fit in the tableContainer, should be rendered.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
-OS Linux Ubuntu Browser: Firefox 103.0b9 (64-bit)
tanstack-virtual version
3.0.0-beta.14
TypeScript version
No response
Additional context
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.
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Chosen plugin not updating dynamic content - Stack Overflow
First of all, you're triggering the event on a string with your code, as .val() returns a string. Try doing it separately, or...
Read more >Trigger to change some upsert records from update to insert
Hello, We have a daily scheduled import of several records to a custom object. The import is set as an "upsert," and is...
Read more >Thinking in Compose | Jetpack Compose - Android Developers
In Compose's declarative approach, widgets are relatively stateless and do not expose setter or getter functions. In fact, widgets are not exposed as...
Read more >Automatically apply VM configuration updates in a MIG
These instances count toward the maxUnavailable number. ... To the Updater, this update appears complete, so no other instances are updated, ...
Read more >Fix problems with dynamic group memberships - Azure AD
Troubleshooting tips for dynamic group membership in Azure Active ... I configured a rule on a group but no memberships get updated in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I don’t know if that’s intentional, but the PR in #366 was not merged yet
Hi, any updates for this issue? 😦 I really don’t like that we have to use a workaround.