1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Force updating virtual list when rowHeights changed

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-07-29 09:39:07 +03:00
parent 16dfbab1ad
commit 3989f1b6af

View File

@ -87,7 +87,7 @@ function VirtualListInner<T extends { getId(): string } | string>({
useEffect(() => {
try {
if (prevItems.current.length !== items.length || !isEqual(prevRowHeights.current, rowHeights)) {
listRef.current?.resetAfterIndex(0, false);
listRef.current?.resetAfterIndex(0);
}
} finally {
prevItems.current = items;