T
TanStack2y ago
national-gold

Problems with list rendering with ssr

Hello, please tell me the solution for tanstack/virtual 3.0.4 I use virtualization for a list on an ssr page, without initialRect tags are not rendered on the server side, which is exactly what I need. For rendering on the server side, I added an initialRect accordingly, but with initialRect on the client, during the first render I get the entire list without virtualization, which is noticeable, how can I fix it?
const virtualList = useVirtualizer({
count: tags.length,
estimateSize: () => 29,
getScrollElement: () => tagsRef.current,
initialRect: { height: tags.length * 29, width 0},
});
const virtualList = useVirtualizer({
count: tags.length,
estimateSize: () => 29,
getScrollElement: () => tagsRef.current,
initialRect: { height: tags.length * 29, width 0},
});
3 Replies
genetic-orange
genetic-orange2y ago
Hi will check it, maybe we hit regression with recent changes
like-gold
like-gold2y ago
Any movement on this? Do we need to open an issue? Facing the same issue here.
provincial-silver
provincial-silver12mo ago
Similar issue #Vue 3 SSR issues

Did you find this page helpful?