diff --git a/packages/hooks/src/useVirtualList/index.ts b/packages/hooks/src/useVirtualList/index.ts index e20f4d7985..02bf62b1a4 100644 --- a/packages/hooks/src/useVirtualList/index.ts +++ b/packages/hooks/src/useVirtualList/index.ts @@ -37,7 +37,7 @@ const useVirtualList = (list: T[], options: Options) => { } let sum = 0; - let endIndex = 0; + let endIndex = fromIndex; for (let i = fromIndex; i < list.length; i++) { const height = itemHeightRef.current(i, list[i]); sum += height;