From 7216f86e7f60020f8e77c7a2493c7eb8cc7c6674 Mon Sep 17 00:00:00 2001 From: duckietm Date: Thu, 26 Feb 2026 17:05:52 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=99=20Fix=20the=20saved=20slots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/InfiniteGrid.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layout/InfiniteGrid.tsx b/src/layout/InfiniteGrid.tsx index e48e691..b24df2f 100644 --- a/src/layout/InfiniteGrid.tsx +++ b/src/layout/InfiniteGrid.tsx @@ -27,7 +27,7 @@ const InfiniteGridRoot = (props: Props) => { if(!item) return ; - return { itemRender(item, index % columnCount) }; + return { itemRender(item, index) }; }) } @@ -94,14 +94,15 @@ const InfiniteGridRoot = (props: Props) => } }> { Array.from(Array(columnCount)).map((e, i) => { - const item = items[i + (virtualRow.index * columnCount)]; + const index = (i + (virtualRow.index * columnCount)); + const item = items[index]; if(!item) return ; return ( - { itemRender(item, i) } + { itemRender(item, index) } ); }) }