Improve containsIndex

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-08-11 12:30:38 +05:30 committed by Bruno Windels
parent 3ae52ea1ca
commit e10b494f0c

View File

@ -43,9 +43,7 @@ class ItemRange {
} }
containsIndex(idx) { containsIndex(idx) {
// TODO: Replace by lastIndex return idx >= this.topCount && idx < this.lastIndex;
// TODO: Should idx be <= since lastIndex is not rendered?
return idx >= this.topCount && idx <= (this.topCount + this.renderCount);
} }
expand(amount) { expand(amount) {