From ee816665745e407d9be542e3217bb0bce3acd232 Mon Sep 17 00:00:00 2001 From: Stanley Pageot Date: Thu, 31 Mar 2022 12:28:56 -0700 Subject: [PATCH] fix: fixed menu stuck when selecting an option --- src/components/form/SimpleSelect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/form/SimpleSelect.js b/src/components/form/SimpleSelect.js index 57bb42ee..17efd310 100644 --- a/src/components/form/SimpleSelect.js +++ b/src/components/form/SimpleSelect.js @@ -303,7 +303,7 @@ const SimpleSelect = withTheme( }, [ref, ref.current]); useEffect(() => { - if (inputValue && !searchInputValue) { + if (inputValue && !selectedOptions) { onSearchClick(); } }, [menuIsVisible]); @@ -386,6 +386,7 @@ const SimpleSelect = withTheme( }; const addInputMethodology = () => { + setSelectedOptions(null) setInputValue(true); };