react-native-bottom-sheet
react-native-bottom-sheet copied to clipboard
[v4] | [v2] The bottom sheet open if a go to another tab and then returns to the tab where I use it. ANDROID
Bug
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | ^4.4.3 |
react-native | 0.68.2 |
react-native-reanimated | ~2.8.0 |
react-native-gesture-handler | ~2.2.1 |
Using the enableLogging() when i press other tab the index change to 0 [BottomSheet::handleOnChange] index:0 animatedCurrentIndex:0, and this is why when I return to the Bottom Sheet tab it appears open. On iOS this event doesn't fire. Is there a way yo prevent this event to fire on ANDROID when i change to another tab?
Steps To Reproduce
- Change to another bottom tab
- Return to the home tab
Describe what you expected to happen:
- Bottom Sheet stays closed
Reproducible sample code
https://user-images.githubusercontent.com/281594/187096544-c1dbc0cf-b54d-4d5d-85b2-9d50b5405e35.mov
This are the logs when I return to the bottom sheet tab
[BottomSheet::render] animatedSnapPoints:0 animatedCurrentIndex:0 providedIndex:-1 [BottomSheetHandleContainer::handleContainerLayout] height:24 [BottomSheetContainer::handleContainerLayout] height:719.7142944335938 [BottomSheet::useAnimatedReaction::OnSnapPointChange] snapPoints:249.71429443359375 [BottomSheet::animateToPosition] currentPosition:0 position:249.71429443359375 velocity:0 [BottomSheet::handleOnAnimate] toIndex:0 fromIndex:0 [BottomSheet::animateToPositionCompleted] animatedCurrentIndex:0 animatedNextPosition:249.71429443359375 animatedNextPositionIndex:0 [BottomSheet::render] animatedSnapPoints:249.71429443359375 animatedCurrentIndex:0 providedIndex:-1
@oillada: hello! :wave:
This issue is being automatically closed because it does not follow the issue template.
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.
This issue was closed because it has been stalled for 5 days with no activity.
any update on this issue