Skip to content

Commit

Permalink
Merge branch 'main' into @szymczak/error-messages-xero-import
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymczakJ committed May 14, 2024
2 parents ef10ca8 + 8c31166 commit cc5ec33
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 cc5ec33

Please sign in to comment.