Having problems with estimateSize and translateY(${virtualRow.start}px)
#883
Replies: 2 comments 1 reply
-
I've done incremental upgrades and pinpointed that the version that breaks my code is v3.0.0-beta.6 with these fixes. Unsure how to proceed to make my code work with the new version |
Beta Was this translation helpful? Give feedback.
0 replies
-
Solved the problem -- in the new version the whole measurement system changed and needed my code to be more precise and robust. |
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
-
Recently upgraded my projects version to the latest and noticed some changed behavior in the feature branch even though the code remained the same and the only changes so far have been package upgrades.
In my list component I have an estimateSize func
const estimateSize = useCallback(() => 1732, []);
Which gets fed to my rowVirtualizer
const rowVirtualizer = useVirtualizer({ count: hasNext ? items.length + 1 : items.length, enableSmoothScroll: false, estimateSize, getScrollElement: useCallback(() => parentRef.current, []), overscan, horizontal: false, rangeExtractor, scrollToFn: scrollTo, ...virtualizerOptions, });
And in a parent file I have the rows being styled with
translateY(${virtualRow.start}px)
Previously, the translateY would be dynamic when i resize the page and I would be able to see it within chrome's inspect, but now the virtualRow.start for the first item will be 0, then 1732 then increments of 1732 leading the rows to be incredibly spaced out, static, and unusable. Not sure what to change or where things have gone wrong, but any help/ideas would be appreciated
Beta Was this translation helpful? Give feedback.
All reactions