Version
v5
Reanimated Version
v4
Gesture Handler Version
v2
Platforms
Android
What happened?
When using stackBehavior="switch" (the default stack behavior) on stacked bottom sheets, presenting a nested child bottom sheet (rendered inside the React tree of the parent sheet) causes the parent sheet to completely unmount/dismiss instead of minimizing.
Because the parent sheet is unmounted, its React subtree is destroyed, causing the newly opened child sheet to unmount and close immediately.
Reproduction steps
- Render a parent
BottomSheetModal (Modal A).
- Inside the children of Modal A, render a child
BottomSheetModal (Modal B).
- Present Modal A.
- Trigger Modal B to present.
- Modal B will briefly mount/appear and then immediately disappear because Modal A gets unmounted/dismissed entirely.
Reproduction sample
https://snack.expo.dev/@gorhom/bottom-sheet---issue-reproduction-template
Relevant log output
Version
v5
Reanimated Version
v4
Gesture Handler Version
v2
Platforms
Android
What happened?
When using
stackBehavior="switch"(the default stack behavior) on stacked bottom sheets, presenting a nested child bottom sheet (rendered inside the React tree of the parent sheet) causes the parent sheet to completely unmount/dismiss instead of minimizing.Because the parent sheet is unmounted, its React subtree is destroyed, causing the newly opened child sheet to unmount and close immediately.
Reproduction steps
BottomSheetModal(Modal A).BottomSheetModal(Modal B).Reproduction sample
https://snack.expo.dev/@gorhom/bottom-sheet---issue-reproduction-template
Relevant log output