diff --git a/playground/src/app/(vault)/vault/create/page.tsx b/playground/src/app/(vault)/vault/create/page.tsx index 89bd9a68..7ae6c696 100644 --- a/playground/src/app/(vault)/vault/create/page.tsx +++ b/playground/src/app/(vault)/vault/create/page.tsx @@ -137,7 +137,7 @@ export default function Create() { return ( -
+
diff --git a/playground/src/app/(vault)/vault/trade/page.tsx b/playground/src/app/(vault)/vault/trade/page.tsx index a84eb4c8..03636882 100644 --- a/playground/src/app/(vault)/vault/trade/page.tsx +++ b/playground/src/app/(vault)/vault/trade/page.tsx @@ -1012,7 +1012,7 @@ export default function Trade() { const exactMode = swapForm.watch("exactMode"); return ( -
+
({ filterOption, }: MultiSelectProps) { const [open, setOpen] = React.useState(false); + const [batchSize, setBatchSize] = React.useState(100); const [searchInputValue, setSearchInputValue] = React.useState(""); const selectedSet = React.useMemo(() => new Set(selected), [selected]); @@ -61,7 +62,10 @@ function MultiSelect({ ); const filteredOptions = React.useMemo(() => { - if (!open) return []; + if (!open) { + setBatchSize(100); + return []; + } if (!searchInputValue) return availableOptions; return availableOptions.filter((option) => filterOption @@ -70,8 +74,6 @@ function MultiSelect({ ); }, [open, availableOptions, searchInputValue, filterOption]); - const [batchSize, setBatchSize] = React.useState(100); - React.useEffect(() => { if (batchSize < filteredOptions.length) { const timeout = setTimeout(() => {