1 Commits

2 changed files with 2 additions and 5 deletions

View File

@@ -22,6 +22,7 @@
count, count,
estimateSize: itemHeight, estimateSize: itemHeight,
gap: itemGap, gap: itemGap,
overscan: 5,
scrollMargin, scrollMargin,
}), }),
); );

View File

@@ -49,11 +49,7 @@
<RowVirtualizer <RowVirtualizer
count={rows.length} count={rows.length}
itemHeight={(index) => itemHeight={(index) =>
rows[index]!.type === "header" rows[index]!.type === "header" ? 28 : 185 + (rows[index]!.isLast ? 16 : 0)}
? 28
: Math.ceil(rows[index]!.files.length / 4) * 181 +
(Math.ceil(rows[index]!.files.length / 4) - 1) * 4 +
16}
class="flex flex-grow flex-col" class="flex flex-grow flex-col"
> >
{#snippet item(index)} {#snippet item(index)}