sforkowany z mirror/soapbox
ScrollableList: fix desync scroll position, add 200px overscan
rodzic
3d605913e8
commit
577c391417
|
@ -161,6 +161,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
|
|
||||||
const handleRangeChange = (range: ListRange) => {
|
const handleRangeChange = (range: ListRange) => {
|
||||||
topIndex.current = range.startIndex;
|
topIndex.current = range.startIndex;
|
||||||
|
handleScroll();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Render the actual Virtuoso list */
|
/** Render the actual Virtuoso list */
|
||||||
|
@ -190,6 +191,7 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
|
||||||
Item,
|
Item,
|
||||||
Footer: loadMore,
|
Footer: loadMore,
|
||||||
}}
|
}}
|
||||||
|
overscan={{ main: 200, reverse: 200 }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue