Closed hirbod closed 3 months ago
Yeah, I think that's default behavior on IOS when handling the view controller. The RN modal presentation styles might be adjusting the container view controller automatically if shown as sheet (pageSheet or formSheet). You can see this in action in this guide, notice the parent is being dismissed temporarily while the child is being presented.
If overFullScreen
isn't ideal, I would suggest to follow the stacking guide instead. You can also use RN navigation, see this guide
You can also try dismissing the sheet gracefully before showing the Modal. E.g:
await sheet.dismiss()
// show modal
Closing this for now. We don't have control on how view controllers are handled in IOS, sorry.
I can't dismiss the sheet in time because it's handled by a third-party module. I pushed a PR to the breaking repo and added overFullScreen
to fix the issue. This might be worth noting in the documentation.
Hi,
In my video, you can see two scenes. The first time I click the connect button, it renders a
Modal
fromreact-native
with default settings. This immediately invokesonDismiss
, which triggers myroute.back()
function. However, it should not do that.When I change the
presentationStyle
to “overFullScreen” (wait at the end of my video while I am hot refreshing) “pageSheet”, or “formSheet”, the issue is resolved.https://github.com/lodev09/react-native-true-sheet/assets/504909/cfc38d09-e581-4222-89d0-39b5c57e26b8
Ideally it should work with the default presentationStyle as well.