Initial render only shows a few rows #382
Unanswered
francislavoie
asked this question in
Q&A
Replies: 1 comment 1 reply
-
That's possible a duplicate of #363. There's a PR(#366) with a fix, but it is not merged yet. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I probably missed something obvious. I essentially followed the example from https://tanstack.com/table/v8/docs/examples/react/virtualized-rows but using react-table v7 (will update soon) and the latest tanstack-virtual beta.
I have to do a bunch of calculation to populate the data for my table, so the initial render with the virtualizer has an empty dataset. Then, the data is ready and the table is rendering, the virtualizer only shows a small subset of the rows it should (like, 6 rows when there's room for 29). As soon as I scroll a single tick (or even just call
scrollTo(0, 1)
on the scroll container), it causes the rest of the rows to pop in.What could possibly cause this? The height of the ref container doesn't change during all this. I've tried calling
rowVirtualizer.measure()
to retrigger the render but that doesn't do anything either. I'm pretty confused.Beta Was this translation helpful? Give feedback.
All reactions