Properly set virtuoso item keys

This commit is contained in:
schroda
2024-10-12 18:41:42 +02:00
parent 306e49d47e
commit c477911e25
7 changed files with 146 additions and 12 deletions

View File

@@ -69,7 +69,6 @@ const createMangaCard = (
mode?: MangaCardProps['mode'],
) => (
<MangaCard
key={manga.id}
manga={manga}
gridLayout={gridLayout}
inLibraryIndicator={inLibraryIndicator}
@@ -195,6 +194,7 @@ const VerticalGrid = forwardRef(
restoreStateFrom={snapshot}
stateChanged={persistGridState}
endReached={() => loadMore()}
computeItemKey={(index) => mangas[index].id}
itemContent={(index) =>
createMangaCard(
mangas[index],