[v4] Bottom sheet close method does nothing after sheet is interrupted while closing
See original GitHub issueBug
Hi, I have a problem with bottom sheet’s close method. When you try to close the bottom sheet with a button and then you interrupt it with your finger. It looks like it’s stuck in some state and close method does absolutely nothing after that. However I can still close the bottom sheet by swiping it down. Or fix “the state” by resizing it manually a bit but that’s not a solution for me as I want to close the bottom sheet with a button. Look at the provided video and snack example. I am using Expo SDK 42.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.1.1 |
react-native | 0.63.53 |
react-native-reanimated | 2.2.2 |
react-native-gesture-handler | 1.10.3 |
Steps To Reproduce
- Open the bottom sheet using the expand() method or use animateOnMount={true}
- Press the close button which calls close()
- Bottom sheet starts it’s closing animation
- While the bottom sheet closing animation is in progress, interrupt it with your finger and hold it in the position
- Lift your finger without swiping
- Press the close button again multiple times
- Nothing happens
Describe what you expected to happen:
- I expect the bottom sheet to close when the close button is pressed again after interrupting it.
Reproducible sample code
https://snack.expo.dev/fUYBOczk2
Video
Logs
Maybe some logs will help you
[BottomSheet::handleClose]
[BottomSheet::animateToPosition] velocity:0 position:725 currentPosition:525
[BottomSheet::handleOnAnimate] toIndex:-1 fromIndex:0
[BottomSheet::handleClose]
[BottomSheet::handleClose]
[BottomSheet::handleClose]
[BottomSheet::handleClose]
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Jetpack Compose BottomSheetScaffold: Smooth closing
This generally works as intended, I can set showBottomSheet.value to false to hide the bottom sheet. However, the hiding looks janky, because ...
Read more >Props | React Native Bottom Sheet - GitHub Pages
This will initially mount the sheet closed and when it's mounted and calculated the layout, it will snap to initial snap point index....
Read more >Sheets: bottom - Material Design
Implementing bottom sheet theming. Setting the theme attribute bottomSheetDialogTheme to your custom ThemeOverlay will affect all bottom sheets. In res/values/ ...
Read more >BottomSheetBehavior | Android Developers
boolean, getSkipCollapsed(). Sets whether this bottom sheet should skip the collapsed state when it is being hidden after it is expanded once.
Read more >Popups: 10 Problematic Trends and Alternatives
Modal: the content on the page is disabled until the user explicitly ... that users will pay no attention to the popup or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Gorhom, is it fixed ?
this related #632 which i am working on a fix that hopefully will land this week 👍