Open
Description
Bug
On web, when your BottomSheet did render, and then you navigated away from it, the _animatedContainerHeight property is set to 0. It causes animatedIndex variable to be 0 - and so, when you navigate back to the screen with the BottomSheet, it opens up immediately.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 5.0.0-alpha.11 |
react-native | 0.74.3 |
react-native-reanimated | 3.10.1 |
react-native-gesture-handler | 2.16.1 |
Steps To Reproduce
- Open up an app on web
- Navigate to the screen with BottomSheet
- Navigate away from it
- Navigate back to it - BottomSheet will pop up immediately (animatedIndex changed to 0)
Reproducible sample code
Here is a demo repo:
https://github.com/5ZYSZ3K/bottom-sheet-web-issue-demo
On web, navigate away from the screen with BottomSheet, and then back to it - it will pop up immediately