Modal is not visible on stacked page with react-navigation/native-stack
See original GitHub issueCurrent behaviour
Modal (or anything inside Portal component) is not visible on stacked pages when I use Native Stack Navigator from react-navigation
. It is actually behind the modal screen.
Its only working when ‘UIModalPresentationCurrentContext’ is used (for example presentation: 'containedModal'
.
https://reactnavigation.org/docs/native-stack-navigator#presentation
repro: https://github.com/alesdvorakcz/navigationtest
Expected behaviour
I am not 100% sure if a fix/support needs to be done on react native paper side or if its outside of your scope. But at least some explanation in docs would be maybe helpful for other users.
###Environment
software | version |
---|---|
ios | 15 |
react-native | 0.66.2 (also tested on 0.63.2) |
react-native-paper | 4.10.0 |
@react-navigation/native | 6.0.6 |
@react-navigation/native-stack | 6.2.5 |
react-native-screens | 3.9.0 |
react-native-vector-icons | 9.0.0 |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
React Navigation 6 (RN6) - Card stack within a modal
I found the solution with Nesting navigators as described here. Basically, I created a ModalStack and used this stack in Screen component as...
Read more >Stack Navigator | React Navigation
Stack Navigator provides a way for your app to transition between screens where each new screen is placed on top of a stack....
Read more >Using modals in Slack apps
View A remains in the view stack, but is no longer visible or active. The user enters some values into input blocks in...
Read more >Routing and Navigation - Expo Documentation
... and displaying the appropriate platform-specific navigation-related user ... createNativeStackNavigator } from '@react-navigation/native-stack'; ...
Read more >Modal - Bootstrap
Below is a static modal example (meaning its position and display have been overridden). Included are the modal header, modal body (required for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is a snack demonstrating the issue as well. @lukewalczak What’s your recommendation on this?
Thanks for the quick response. I did ultimately end up getting it resolved by rearchitecting the navigation, but your solutions works as well. Feel free to close this and thanks again.