pl-fe: add some reasonable overscan

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-03-13 19:27:20 +01:00
parent 8da53b3006
commit 41f550fa41

View File

@ -101,7 +101,6 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
placeholderComponent: Placeholder,
placeholderCount = 0,
initialTopMostItemIndex = 0,
style = {},
useWindowScroll = true,
...params
}, ref) => {
@ -236,10 +235,10 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
return (
<Virtuoso
{...params}
ref={ref}
id={id}
useWindowScroll={useWindowScroll}
{...params}
overscan={window.innerHeight * 1.5}
ref={ref}
data={data}
totalCount={data.length}
startReached={onScrollToTop}
@ -248,8 +247,6 @@ const ScrollableList = React.forwardRef<VirtuosoHandle, IScrollableList>(({
itemContent={renderItem}
initialTopMostItemIndex={initialIndex}
rangeChanged={handleRangeChange}
className={className}
style={style}
context={{
listClassName,
itemClassName,