Skip to content

Commit

Permalink
Update VirtuosoGridEngine.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorosty authored and mohtada-h committed Aug 28, 2021
1 parent 29e19ac commit 470aa41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VirtuosoGridEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 470aa41

Please sign in to comment.