ScrollableList: fix desync scroll position, add 200px overscan
This commit is contained in:
parent
3d605913e8
commit
577c391417
|
@ -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 }}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue