gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://ui.gorhom.dev/components/bottom-sheet
MIT License
6.7k stars 742 forks source link

[v4] Request: smoother keyboard transition when the bottom sheet is dismissed programmatically #641

Open SimpleCreations opened 3 years ago

SimpleCreations commented 3 years ago

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

pfcodes commented 1 year 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.

github-actions[bot] commented 11 months ago

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.

pfcodes commented 11 months ago

Not stale

github-actions[bot] commented 10 months ago

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.

SimpleCreations commented 10 months ago

Not stale

github-actions[bot] commented 9 months ago

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.

pfcodes commented 9 months ago

Not stale

github-actions[bot] commented 8 months ago

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.

SimpleCreations commented 8 months ago

Not stale

github-actions[bot] commented 6 months ago

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.

pfcodes commented 6 months ago

Not stale

github-actions[bot] commented 5 months ago

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.

SimpleCreations commented 5 months ago

Not stale

Smizz1609 commented 4 months ago

Any one found the solution?

Engazan commented 4 months ago

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

github-actions[bot] commented 3 months ago

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.

SimpleCreations commented 3 months ago

Not stale

github-actions[bot] commented 2 months ago

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.

SimpleCreations commented 2 months ago

Not stale

github-actions[bot] commented 1 month ago

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.

SimpleCreations commented 1 month ago

Not stale

github-actions[bot] commented 3 weeks ago

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.

SimpleCreations commented 3 weeks ago

Not stale