Skip to content

Commit

Permalink
reset 之前要去校验下 form 合法性
Browse files Browse the repository at this point in the history
  • Loading branch information
monkindey committed Sep 14, 2021
1 parent 7dfeb77 commit f0da528
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/use-form-table/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ const useFormTablePlugin: () => TableNormalPlugin = () => {
});

$(methods.ON_FORM_RESET).subscribe((payload) => {
return app.query(
{ ...payload.values, current: app.ctx.options.current },
{ [IS_FORM_DATA_SUBMITTED]: true, queryFrom: methods.ON_FORM_RESET }
);
return actions.validate().then(() => {
return app.query(
{ ...payload.values, current: app.ctx.options.current },
{ [IS_FORM_DATA_SUBMITTED]: true, queryFrom: methods.ON_FORM_RESET }
);
});
});

effects($, ...args);
Expand Down

0 comments on commit f0da528

Please sign in to comment.