From 7c67cbd0e09461e9e8025f08932a5053723e43a4 Mon Sep 17 00:00:00 2001 From: Max Urban <56982278+labtorie@users.noreply.github.com> Date: Wed, 23 Feb 2022 17:01:53 +0300 Subject: [PATCH] Fixed onViewableItemsChanged function --- lib/BigList.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/BigList.jsx b/lib/BigList.jsx index cf349fa..56ff3b0 100644 --- a/lib/BigList.jsx +++ b/lib/BigList.jsx @@ -384,6 +384,7 @@ class BigList extends PureComponent { if (type === BigListItemType.ITEM) { return { item: this.getItem({ section, index }), + section: section, key: key, index: (section + 1) * index, isViewable: this.isVisible({ section, index }), @@ -581,7 +582,7 @@ class BigList extends PureComponent { let s = 0; while (s <= section) { - const rows = Math.ceil(sections[section] / numColumns); + const rows = Math.ceil(sections[s] / numColumns); if (rows === 0) { s += 1; continue;