Merge pull request #7168 from BlueWallet/kbdi

FIX: Keyboard didnt dismiss on selection
This commit is contained in:
GLaDOS 2024-10-15 14:52:24 +00:00 committed by GitHub
commit ef9f9fa8d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
import dayjs from 'dayjs';
import calendar from 'dayjs/plugin/calendar';
import React, { useEffect, useLayoutEffect, useMemo, useState } from 'react';
import { FlatList, NativeSyntheticEvent, StyleSheet, View, LayoutAnimation, UIManager, Platform } from 'react-native';
import { FlatList, NativeSyntheticEvent, StyleSheet, View, LayoutAnimation, UIManager, Platform, Keyboard } from 'react-native';
import {
CurrencyRate,
@ -87,6 +87,7 @@ const Currency: React.FC = () => {
isLoading={isSavingNewPreferredCurrency && selectedCurrency.endPointKey === item.endPointKey}
subtitle={item.country}
onPress={async () => {
Keyboard.dismiss();
setIsSavingNewPreferredCurrency(item);
try {
await getFiatRate(item.endPointKey);

View file

@ -1,5 +1,5 @@
import React, { useEffect, useLayoutEffect, useState } from 'react';
import { FlatList, NativeSyntheticEvent, StyleSheet } from 'react-native';
import { FlatList, Keyboard, NativeSyntheticEvent, StyleSheet } from 'react-native';
import presentAlert from '../../components/Alert';
import ListItem from '../../components/ListItem';
import { useTheme } from '../../components/themes';
@ -33,6 +33,7 @@ const Language = () => {
}, [language]);
const onLanguageSelect = (item: TLanguage) => {
Keyboard.dismiss();
const currentLanguage = AvailableLanguages.find(l => l.value === language);
setLanguageStorage(item.value).then(() => {
if (currentLanguage?.isRTL !== item.isRTL) {