Skip to content

Commit

Permalink
Wizard 的 step 上配置 rediret 和 reload 使其生效
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Jun 23, 2020
1 parent 43c6e05 commit 4b79a4f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/renderers/Wizard.tsx
Expand Up @@ -553,13 +553,16 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
}

const finalRedirect =
(action.redirect || redirect) &&
filter(action.redirect || redirect, store.data);
(action.redirect || step.redirect || redirect) &&
filter(action.redirect || step.redirect || redirect, store.data);

if (finalRedirect) {
env.jumpTo(finalRedirect, action);
} else if (action.reload || reload) {
this.reloadTarget(action.reload || reload, store.data);
} else if (action.reload || step.reload || reload) {
this.reloadTarget(
action.reload || step.reload || reload,
store.data
);
}

return value;
Expand Down

0 comments on commit 4b79a4f

Please sign in to comment.