Fix events issue when swiping back (#3420)

This commit is contained in:
Eric Vicenti
2018-02-03 12:20:55 -08:00
parent 425dc24b31
commit 5e83b3aba6
2 changed files with 5 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ const createAction = (type, fn) => {
const back = createAction(BACK, (payload = {}) => ({
type: BACK,
key: payload.key,
immediate: payload.immediate,
}));
const init = createAction(INIT, (payload = {}) => {

View File

@@ -183,7 +183,10 @@ class CardStack extends React.Component {
const backFromScene = scenes.find(s => s.index === toValue + 1);
if (!this._isResponding && backFromScene) {
navigation.dispatch(
NavigationActions.back({ key: backFromScene.route.key })
NavigationActions.back({
key: backFromScene.route.key,
immediate: true,
})
);
}
});