fix: Wizard组件点击下一步会多提交一次问题 (#4728)

This commit is contained in:
RUNZE LU 2022-06-28 19:27:05 +08:00 committed by GitHub
parent 193de3b04d
commit 84fb9f16ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -809,7 +809,7 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
// 接管里面 form 的提交,不能直接让 form 提交,因为 wizard 自己需要知道进度。
@autobind
async handleSubmit(values: object, action: ActionObject) {
handleSubmit(values: object, action: ActionObject) {
const {store, steps, finishedField} = this.props;
if (this.state.currentStep < steps.length) {