From 577c39141758b01538bbcd8a9a5a76d570827abf Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 1 Jun 2022 19:36:55 -0500 Subject: [PATCH] ScrollableList: fix desync scroll position, add 200px overscan --- app/soapbox/components/scrollable_list.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/soapbox/components/scrollable_list.tsx b/app/soapbox/components/scrollable_list.tsx index 18dd1e987..9f5af5601 100644 --- a/app/soapbox/components/scrollable_list.tsx +++ b/app/soapbox/components/scrollable_list.tsx @@ -161,6 +161,7 @@ const ScrollableList = React.forwardRef(({ const handleRangeChange = (range: ListRange) => { topIndex.current = range.startIndex; + handleScroll(); }; /** Render the actual Virtuoso list */ @@ -190,6 +191,7 @@ const ScrollableList = React.forwardRef(({ Item, Footer: loadMore, }} + overscan={{ main: 200, reverse: 200 }} /> );