mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 09:13:43 +08:00
Fix events issue when swiping back (#3420)
This commit is contained in:
@@ -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 = {}) => {
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user