From 13e89dc6937b3de84e6cdbf0b26a3b57f6a886ad Mon Sep 17 00:00:00 2001 From: daproclaima Date: Tue, 24 Sep 2024 08:42:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(react)=20fix=20select=20mono=20sto?= =?UTF-8?q?ries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove unused error var --- .../components/Forms/Select/mono.stories.tsx | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/packages/react/src/components/Forms/Select/mono.stories.tsx b/packages/react/src/components/Forms/Select/mono.stories.tsx index 69407e9f..1d3b42c4 100644 --- a/packages/react/src/components/Forms/Select/mono.stories.tsx +++ b/packages/react/src/components/Forms/Select/mono.stories.tsx @@ -190,13 +190,9 @@ export const SearchableUncontrolledWithAsyncOptionsFetching = () => { let arrayOptions: Option[] = []; setIsLoading(true); - try { - context.search = isInitialOptionFetching ? "" : context.search; - arrayOptions = await fetchOptions(context, OPTIONS, 1000); - setIsInitialOptionFetching(false); - } catch (error) { - /* empty */ - } + context.search = isInitialOptionFetching ? "" : context.search; + arrayOptions = await fetchOptions(context, OPTIONS, 1000); + setIsInitialOptionFetching(false); setIsLoading(false); return arrayOptions; @@ -224,13 +220,9 @@ export const SearchableUncontrolledWithAsyncOptionsFetchingAndDefaultValue = let arrayOptions: Option[] = []; setIsLoading(true); - try { - context.search = isInitialOptionFetching ? "" : context.search; - arrayOptions = await fetchOptions(context, OPTIONS, 1000); - setIsInitialOptionFetching(false); - } catch (error) { - /* empty */ - } + context.search = isInitialOptionFetching ? "" : context.search; + arrayOptions = await fetchOptions(context, OPTIONS, 1000); + setIsInitialOptionFetching(false); setIsLoading(false); return arrayOptions;