Closed
Description
Current behavior
Hi!
The docs say that detachPreviousScreen
is set to false
if presentation
is set to transparentModal
or modal
.
It seems that it is not the case:
react-navigation/packages/stack/src/views/Stack/CardStack.tsx
Lines 615 to 616 in 25e834b
In my app, it's true
by default on iOS and the previous screen is visible but on Android the previous screen is not visible.
Is it a mistake in the docs or in the code? Should I make a PR with detachPreviousScreen = options.presentation === 'transparentModal' || options.presentation === 'modal'
?
Expected behavior
If the docs are correct, detachPreviousScreen
should be set to false
when using presentation: 'modal'
Reproduction
None.
Platform
- Android
- iOS
- Web
- Windows
- MacOS
Packages
- @react-navigation/bottom-tabs
- @react-navigation/drawer
- @react-navigation/material-top-tabs
- @react-navigation/stack
- @react-navigation/native-stack
- react-native-tab-view
Environment
- I've removed the packages that I don't use
package | version |
---|---|
@react-navigation/native | 6.1.6 |
@react-navigation/bottom-tabs | 6.3.1 |
@react-navigation/stack | 6.3.16 |
react-native-screens | 3.29.0 |
react-native-gesture-handler | 2.15.0 |
react-native-reanimated | 3.7.1 |
react-native-tab-view | 3.1.1 |
react-native-pager-view | 5.4.11 |
react-native | 0.73.6 |
node | 18.16.1 |
npm or yarn | 1.22.17 |