Fix gesturesEnabled regression (#886)

Closes #818
Regression caused by 11cab8eab6
This commit is contained in:
Bruno Lemos
2017-04-01 23:45:49 -03:00
committed by Satyajit Sahoo
parent 8c9a626401
commit 3eb7b12f85

View File

@@ -446,7 +446,15 @@ class CardStack extends Component<DefaultProps, Props, void> {
});
},
});
const gesturesEnabled = this.props.mode === 'card' && Platform.OS === 'ios';
const cardStackConfig = this.props.router.getScreenConfig(
props.navigation,
'cardStack'
) || {};
const gesturesEnabled = typeof cardStackConfig.gesturesEnabled === 'boolean' ?
cardStackConfig.gesturesEnabled :
this.props.mode === 'card' && Platform.OS === 'ios';
const handlers = gesturesEnabled ? responder.panHandlers : {};
return (
<View