Skip to content

Commit 7dd2717

Browse files
committed
fix: Virtual calculation should not count virtual:false in
fix ant-design/ant-design#25682
1 parent 30de2e0 commit 7dd2717

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/List.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,12 @@ class List<T = any> extends React.Component<ListProps<T>, ListState<T>> {
293293
this.lockScroll = false;
294294
});
295295
});
296-
} else if (prevData.length !== data.length && changedItemIndex !== null && height) {
296+
} else if (
297+
prevData.length !== data.length &&
298+
changedItemIndex !== null &&
299+
height &&
300+
virtual !== false
301+
) {
297302
/**
298303
* Re-calculate the item position since `data` length changed.
299304
* [IMPORTANT] We use relative position calculate here.

0 commit comments

Comments
 (0)