-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
Description
Current Behavior
navigationOptions: {gestureDirection: 'horizontal'}
does not work for stack navigators with mode: 'modal'
. Using gestureDirection: 'horizontal-inverted'
, leeds to a vertical-inverted gestureDirection.
See my current stack navigator setup here:
const MainModalNavigator = createStackNavigator(
{
Main: {screen: MainDrawerNavigator},
Notifications: {
screen: NotificationsScreen,
navigationOptions: {gestureDirection: 'horizontal'},
},
},
{
mode: 'modal',
headerMode: 'none',
initialRouteName: 'Main',
defaultNavigationOptions: {
cardStyle: {
backgroundColor: 'rgba(0, 0, 0, 0)',
},
},
},
);
Expected Behaviorx
Stack navigators with mode: 'modal'
should allow horizontal gestureDirection.
How to reproduce
Find a minimal GH repo to reproduce the issue here: https://github.com/abegehr/react-navigation-horizontal-modal-stack
The repo is based on expo and can be run easily through the expo-cli.
The repo was produced by:
expo init
with react-navigation 'tabs' template- removed unnecessary files and code
- simple Home, Links and Settings screen with rudimentary navigation between them
- use same navigation setup as described in 'Current Behavior'
=> Please let me know if this is helpful and if I can do anything else to make the issue more clear
Your Environment
- iOS 13.3
- "react-navigation": "^4.1.0",
- "react-navigation-stack": "^2.0.16",
- "react-native-gesture-handler": "^1.5.4",
- "react-native-safe-area-context": "^0.6.4",
- "react-native-screens": "^2.0.0-alpha.32",
- "react-native": "^0.61.5",
- Now using node v12.14.1 (npm v6.13.4)
- yarn 1.19.2