Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Commit 3aa95b7

Browse files
committed
update buffer based on scroll
1 parent c860bb4 commit 3aa95b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/primitives/Lazy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ function createLazy<T>(
3939
return props.buffer;
4040
}
4141
const scroll = props.scroll || props.style?.scroll;
42-
if (scroll === 'always') return props.upCount;
43-
if (scroll === 'center') return Math.ceil(props.upCount / 2);
42+
if (!scroll || scroll === 'auto' || scroll === 'always') return props.upCount + 1;
43+
if (scroll === 'center') return Math.ceil(props.upCount / 2) + 1;
4444
return 2;
4545
});
4646

0 commit comments

Comments
 (0)