dismiss keyboard when opening dialog

zio/stable
Samuel Newman 2024-03-20 18:02:18 +00:00
parent 708d0fe3e1
commit fb17afc99d
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import {View} from 'react-native' import {Keyboard, View} from 'react-native'
import {msg} from '@lingui/macro' import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@ -27,6 +27,7 @@ export function HostingProvider({
const {_} = useLingui() const {_} = useLingui()
const onPressSelectService = React.useCallback(() => { const onPressSelectService = React.useCallback(() => {
Keyboard.dismiss()
serverInputControl.open() serverInputControl.open()
if (onOpenDialog) { if (onOpenDialog) {
onOpenDialog() onOpenDialog()

View File

@ -67,7 +67,7 @@ export function ServerInputDialog({
return ( return (
<Dialog.Outer <Dialog.Outer
control={control} control={control}
nativeOptions={{sheet: {snapPoints: ['80', '100%']}}} nativeOptions={{sheet: {snapPoints: ['100%']}}}
onClose={onClose}> onClose={onClose}>
<Dialog.Handle /> <Dialog.Handle />