diff --git a/src/components/CurrencyPicker.tsx b/src/components/CurrencyPicker.tsx index f382542c6538..bf4b12be292f 100644 --- a/src/components/CurrencyPicker.tsx +++ b/src/components/CurrencyPicker.tsx @@ -57,7 +57,7 @@ function CurrencyPicker({selectedCurrency, label = '', errorText = '', value, on hidePickerModal} + onClose={hidePickerModal} onModalHide={hidePickerModal} hideModalContentWhileAnimating useNativeDriver diff --git a/src/pages/workspace/WorkspaceConfirmationPage.tsx b/src/pages/workspace/WorkspaceConfirmationPage.tsx index 2a7b392a9467..9b76a7d30e95 100644 --- a/src/pages/workspace/WorkspaceConfirmationPage.tsx +++ b/src/pages/workspace/WorkspaceConfirmationPage.tsx @@ -13,6 +13,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import ScrollView from '@components/ScrollView'; import Text from '@components/Text'; import TextInput from '@components/TextInput'; +import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import {createWorkspaceWithPolicyDraftAndNavigateToIt} from '@libs/actions/App'; @@ -39,6 +40,7 @@ function getFirstAlphaNumericCharacter(str = '') { function WorkspaceConfirmationPage() { const styles = useThemeStyles(); const {translate} = useLocalize(); + const {inputCallbackRef} = useAutoFocusInput(); const validate = useCallback( (values: FormOnyxValues) => { @@ -110,7 +112,10 @@ function WorkspaceConfirmationPage() { title={translate('workspace.new.confirmWorkspace')} onBackButtonPress={() => Navigation.goBack()} /> - + {translate('workspace.emptyWorkspace.subtitle')} @@ -156,7 +161,6 @@ function WorkspaceConfirmationPage() { label={translate('workspace.common.workspaceName')} accessibilityLabel={translate('workspace.common.workspaceName')} spellCheck={false} - autoFocus defaultValue={defaultWorkspaceName} onChangeText={(str) => { if (getFirstAlphaNumericCharacter(str) === getFirstAlphaNumericCharacter(workspaceNameFirstCharacter)) { @@ -164,6 +168,7 @@ function WorkspaceConfirmationPage() { } setWorkspaceNameFirstCharacter(str); }} + ref={inputCallbackRef} />