Open izakfilmalter opened 1 year ago
Did some more testing. Tried doing navigation.replace
, didn't work. Seems like we need some way to override the following:
const onDismiss = React.useCallback(() => {
// BottomSheetModal will call onDismiss on unmount, be we do not want that since
// we already popped the screen.
if (isMounted.current) {
navigation.goBack();
}
}, [navigation]);
Maybe an exit all modals function.
It seems really hard to close all open modals. I have two modals that are open using
stackBehavior: 'replace'
. The second modal contains a form that navigates to a different screen on submit. When I submit, it navigates to the new screen, and then opens the old modal again.I have tried calling
dismissAll
fromuseBottomSheetModal
. I have tried doing callingNavigation.goBack()
and thenNavigation.navigate
.