Skip to content

Commit 3c280cf

Browse files
committed
fix(useVirtual): add defaultEstimateSize as 50
1 parent 08f0fd4 commit 3c280cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import useScroll from './useScroll'
44
import useRect from './useRect'
55
import useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect'
66

7+
const defaultEstimateSize = () => 50
8+
79
export function useVirtual({
810
size = 0,
9-
estimateSize,
11+
estimateSize = defaultEstimateSize,
1012
overscan = 0,
1113
parentRef,
1214
horizontal,

0 commit comments

Comments
 (0)