Open SimpleCreations opened 3 years ago
import React, { useCallback } from 'react'
import { Keyboard, Platform } from 'react-native'
import {
BottomSheetBackdropProps,
BottomSheetBackdrop as BaseBottomSheetBackdrop,
} from '@gorhom/bottom-sheet'
const BottomSheetBackdrop = (props: BottomSheetBackdropProps) => {
const handleOnPress = useCallback(() => {
if (Platform.OS === 'ios') {
Keyboard.dismiss()
}
}, [])
return (
<BaseBottomSheetBackdrop
disappearsOnIndex={-1}
appearsOnIndex={0}
onPress={handleOnPress}
pressBehavior={'close'}
{...props}
/>
)
}
export default BottomSheetBackdrop
this doesn't even work for me. for some reason if the keyboard is dismissed the bottom sheet will not dismiss itself. it will position itself to where the keyboard used to be. I only have a single snap point.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
Any one found the solution?
Any one found the solution?
Yes use different package cuz this one doesnt care
For example i switched to this: https://github.com/expo/react-native-action-sheet
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Not stale
Feature Request
Currently, when the bottom sheet is dismissed via the
dismiss
method while the keyboard is open, the sheet first slides all the way under the keyboard, and the keyboard then stays on screen for about a second before disappearing.This feels like a performance issue from the UX perspective, and it would be great if the keyboard started sliding down along with the bottom sheet at the same time, thus eliminating the delay.
Demo of the current behavior:
https://user-images.githubusercontent.com/12449725/133307532-c01d43bd-025c-4f5c-9d87-5af074d5b28a.mp4
Why it is needed
Possible implementation
Code sample