ScrollableList: fix desync scroll position, add 200px overscan

This commit is contained in:
Alex Gleason 2022-06-01 19:36:55 -05:00
parent 3d605913e8
commit 577c391417
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
const handleRangeChange = (range: ListRange) => {
topIndex.current = range.startIndex;
handleScroll();
};
/** Render the actual Virtuoso list */
@ -190,6 +191,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
Item,
Footer: loadMore,
}}
overscan={{ main: 200, reverse: 200 }}
/>
);