We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 497aacf commit d5a7618Copy full SHA for d5a7618
src/lib/hooks/useInitialNumToRender.ts
@@ -15,5 +15,10 @@ export function useInitialNumToRender({
15
16
const finalHeight =
17
screenHeight - screenHeightOffset - topInset - bottomBarHeight
18
- return Math.floor(finalHeight / minItemHeight) + 1
+
19
+ const minItems = Math.floor(finalHeight / minItemHeight)
20
+ if (minItems < 1) {
21
+ return 1
22
+ }
23
+ return minItems
24
}
0 commit comments