fix swipe to go back by providing the index (#4409)

This commit is contained in:
James Bechet 2018-06-04 16:55:26 -04:00 committed by Brent Vatne
parent 2f90899620
commit 01b43974e6

View File

@ -211,6 +211,8 @@ class StackViewLayout extends React.Component {
_panResponder = PanResponder.create({
onPanResponderTerminate: () => {
const { navigation } = this.props.transitionProps;
const { index } = navigation.state;
this._isResponding = false;
this._reset(index, 0);
this.props.onGestureCanceled && this.props.onGestureCanceled();