From e79906118253455b4e827da30556fbff29a6268b Mon Sep 17 00:00:00 2001 From: Huu Le <20178761+huult@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:17:27 +0700 Subject: [PATCH] Ensure keyboard dismisses before navigating to workspace list --- src/components/ValuePicker/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ValuePicker/index.tsx b/src/components/ValuePicker/index.tsx index 5b877e139af0..602fd5d47cf4 100644 --- a/src/components/ValuePicker/index.tsx +++ b/src/components/ValuePicker/index.tsx @@ -6,6 +6,7 @@ import useStyleUtils from '@hooks/useStyleUtils'; import Navigation from '@libs/Navigation/Navigation'; import variables from '@styles/variables'; import CONST from '@src/CONST'; +import KeyboardUtils from '@src/utils/keyboard'; import type {ValuePickerItem, ValuePickerProps} from './types'; import ValueSelectorModal from './ValueSelectorModal'; @@ -14,7 +15,9 @@ function ValuePicker({value, label, items, placeholder = '', errorText = '', onI const [isPickerVisible, setIsPickerVisible] = useState(false); const showPickerModal = () => { - setIsPickerVisible(true); + KeyboardUtils.dismiss().then(() => { + setIsPickerVisible(true); + }); }; const hidePickerModal = () => {