From c4da6f1af87935907cea4cf3b716481f2c718ea4 Mon Sep 17 00:00:00 2001 From: tienifr Date: Tue, 14 May 2024 15:39:37 +0700 Subject: [PATCH] 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 ?? ''); + }} />