react-native-bottom-sheet icon indicating copy to clipboard operation
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

Open oillada opened this issue 2 years ago • 1 comments

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

  1. Change to another bottom tab
  2. Return to the home tab

Describe what you expected to happen:

  1. 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 avatar Aug 28 '22 21:08 oillada

@oillada: hello! :wave:

This issue is being automatically closed because it does not follow the issue template.

github-actions[bot] avatar Aug 28 '22 21:08 github-actions[bot]

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.

github-actions[bot] avatar Sep 28 '22 09:09 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 03 '22 09:10 github-actions[bot]

any update on this issue

rahmanharoon avatar Jul 27 '23 12:07 rahmanharoon