From 470aa418965be697f7fbbb961b78573de4ef7ae2 Mon Sep 17 00:00:00 2001 From: Dorosty Date: Thu, 26 Aug 2021 23:58:39 +0430 Subject: [PATCH] Update VirtuosoGridEngine.ts --- src/VirtuosoGridEngine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtuosoGridEngine.ts b/src/VirtuosoGridEngine.ts index 4c0387f46..b389b5a07 100644 --- a/src/VirtuosoGridEngine.ts +++ b/src/VirtuosoGridEngine.ts @@ -108,7 +108,7 @@ export const VirtuosoGridEngine = ({ initialItemCount = 0, autoReset = false } = const listBottom = itemHeight * toRowIndex(endIndex, itemsPerRow) + itemHeight // totalCount has decreased, we have to re-render - if (endIndex < totalCount - 1) { + if (endIndex > totalCount - 1) { updateRange(true) // user is scrolling up - list top is below the top edge of the viewport } else if (listTop > scrollTop) {