1
votes

i want to psuh new screen on top off a model in react-navigation
Current Behavior

The react-native Modal is the highest zIndex. All the screens pushed onto the StackNavigator by react-navigation are below it.

react-navigation

Expected Behavior

The new screen should be pushed on top of the react-native Modal

How to reproduce

render a react-native Modal with some boilerplate code, and then on tap button in your custom modal, just run

this.props.navigation.navigate(SCREEN_NAME);

1
how you are creating the modal / stack navigator?locropulenton
can't pop modal before going to other pagenima moradi
can you show the codenima moradi
@nima_moradi Can't pop modal in my certain usecase. modal is required to be stacked under the new page.darkermuffin
@locropulenton Modal is created using the <Modal> </Modal> imported from React Native. And it is displayed with boolean from state. Check this : facebook.github.io/react-native/docs/modal.htmldarkermuffin

1 Answers

0
votes

React Navigation Implements the modal on root level. So there is no way to push anything on the top of modal. If you want to achieve this behavior you might create a stack navigator with mode modal Here is a link of an expo snack