diff --git a/src/components/FindWalletProductTable/index.tsx b/src/components/FindWalletProductTable/index.tsx index 9c5c0f1da98..cdbda9749e8 100644 --- a/src/components/FindWalletProductTable/index.tsx +++ b/src/components/FindWalletProductTable/index.tsx @@ -68,6 +68,7 @@ const FindWalletProductTable = ({ wallets }: { wallets: WalletRow[] }) => { )} filters={filters} matomoEventCategory="find-wallet" + estimateSize={300} /> )} diff --git a/src/components/ProductTable/List.tsx b/src/components/ProductTable/List.tsx index 34ea0846d78..69da787e6f7 100644 --- a/src/components/ProductTable/List.tsx +++ b/src/components/ProductTable/List.tsx @@ -21,6 +21,7 @@ type ListProps = { ) => React.ReactNode matomoEventCategory: string filters: FilterOption[] + estimateSize: number } const List = ({ @@ -28,6 +29,7 @@ const List = ({ subComponent, matomoEventCategory, filters, + estimateSize, }: ListProps) => { const [expanded, setExpanded] = useState>({}) @@ -36,7 +38,7 @@ const List = ({ const virtualizer = useWindowVirtualizer({ count: data.length, - estimateSize: () => 300, + estimateSize: () => estimateSize, overscan: 5, scrollMargin: parentOffsetRef.current, }) @@ -90,6 +92,26 @@ const List = ({ height: `${virtualizer.getTotalSize()}px`, }} > + {virtualizer.getVirtualItems().map((virtualItem) => { const item = data[virtualItem.index]