From 93e875c98d90db369dbc25432f2ff5611808a9fd Mon Sep 17 00:00:00 2001 From: Juliet Date: Sat, 14 Mar 2026 12:52:59 +0100 Subject: [PATCH] fix estimate size --- src/views/pds.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/pds.tsx b/src/views/pds.tsx index 8fdcd43..1869980 100644 --- a/src/views/pds.tsx +++ b/src/views/pds.tsx @@ -147,7 +147,7 @@ export const PdsView = () => { get count() { return repos()?.length ?? 0; }, - estimateSize: () => 32, + estimateSize: () => 33, overscan: 10, get scrollMargin() { return containerRef?.offsetTop ?? 0; @@ -211,11 +211,11 @@ export const PdsView = () => { - setExpandedIndex( - expandedIndex() === virtualItem.index ? null : virtualItem.index, - ) - } + onToggle={() => { + const isClosing = expandedIndex() === virtualItem.index; + setExpandedIndex(isClosing ? null : virtualItem.index); + if (isClosing) requestAnimationFrame(() => virtualizer.measure()); + }} /> )} -- 2.51.2