From e585a4b35c6edc11cae5634a7384cb2a92d54f56 Mon Sep 17 00:00:00 2001 From: tienifr Date: Mon, 13 May 2024 11:28:41 +0700 Subject: [PATCH 1/2] press save btn --- src/components/TextPicker/TextSelectorModal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/TextPicker/TextSelectorModal.tsx b/src/components/TextPicker/TextSelectorModal.tsx index 2abbd9abc8e6..1fc62ad06d4e 100644 --- a/src/components/TextPicker/TextSelectorModal.tsx +++ b/src/components/TextPicker/TextSelectorModal.tsx @@ -40,7 +40,10 @@ function TextSelectorModal({value, description = '', onValueSelected, isVisible, title={description} onBackButtonPress={onClose} /> - + Date: Tue, 14 May 2024 15:39:37 +0700 Subject: [PATCH 2/2] fix: dismiss keyboard --- src/components/TextPicker/TextSelectorModal.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/TextPicker/TextSelectorModal.tsx b/src/components/TextPicker/TextSelectorModal.tsx index 1fc62ad06d4e..d59b1e0a3203 100644 --- a/src/components/TextPicker/TextSelectorModal.tsx +++ b/src/components/TextPicker/TextSelectorModal.tsx @@ -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'; @@ -57,7 +57,10 @@ function TextSelectorModal({value, description = '', onValueSelected, isVisible, large pressOnEnter text={translate('common.save')} - onPress={() => onValueSelected?.(currentValue ?? '')} + onPress={() => { + Keyboard.dismiss(); + onValueSelected?.(currentValue ?? ''); + }} />