Skip to content

Commit

Permalink
Merge pull request Expensify#42035 from tienifr/fix/38497-can-not-pre…
Browse files Browse the repository at this point in the history
…ss-save-btn
  • Loading branch information
luacmartins authored May 14, 2024
2 parents b587bf7 + c4da6f1 commit 8c31166
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/TextPicker/TextSelectorModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useState} from 'react';
import {View} from 'react-native';
import {Keyboard, View} from 'react-native';
import Button from '@components/Button';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import Modal from '@components/Modal';
Expand Down Expand Up @@ -40,7 +40,10 @@ function TextSelectorModal({value, description = '', onValueSelected, isVisible,
title={description}
onBackButtonPress={onClose}
/>
<ScrollView contentContainerStyle={[styles.flex1, styles.mh5, styles.mb5]}>
<ScrollView
contentContainerStyle={[styles.flex1, styles.mh5, styles.mb5]}
keyboardShouldPersistTaps="handled"
>
<View style={styles.flex1}>
<TextInput
// eslint-disable-next-line react/jsx-props-no-spreading
Expand All @@ -54,7 +57,10 @@ function TextSelectorModal({value, description = '', onValueSelected, isVisible,
large
pressOnEnter
text={translate('common.save')}
onPress={() => onValueSelected?.(currentValue ?? '')}
onPress={() => {
Keyboard.dismiss();
onValueSelected?.(currentValue ?? '');
}}
/>
</ScrollView>
</ScreenWrapper>
Expand Down

0 comments on commit 8c31166

Please sign in to comment.