From e10b494f0ca859aaa27b53e999b4205490925346 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 11 Aug 2021 12:30:38 +0530 Subject: [PATCH] Improve containsIndex Signed-off-by: RMidhunSuresh --- src/platform/web/ui/general/LazyListView.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/platform/web/ui/general/LazyListView.js b/src/platform/web/ui/general/LazyListView.js index b0d28c51..2c070d95 100644 --- a/src/platform/web/ui/general/LazyListView.js +++ b/src/platform/web/ui/general/LazyListView.js @@ -43,9 +43,7 @@ class ItemRange { } containsIndex(idx) { - // TODO: Replace by lastIndex - // TODO: Should idx be <= since lastIndex is not rendered? - return idx >= this.topCount && idx <= (this.topCount + this.renderCount); + return idx >= this.topCount && idx < this.lastIndex; } expand(amount) {