Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable submit button while submitting #27667

Open
1 task done
Wgil opened this issue Nov 9, 2020 · 5 comments
Open
1 task done

Disable submit button while submitting #27667

Wgil opened this issue Nov 9, 2020 · 5 comments

Comments

@Wgil
Copy link

Wgil commented Nov 9, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

I want to disable my form submit button without adding an additional state on every form.

What does the proposed API look like?

Add {isSubmitting: boolean} property to FormInstance type which would toggled by ant form internal state on form submission.

@Wgil
Copy link
Author

Wgil commented Nov 12, 2020

Can I work on this?

@kerm1it
Copy link
Member

kerm1it commented Nov 13, 2020

Yes,welcome to send PR.

@Wgil
Copy link
Author

Wgil commented Nov 14, 2020

Looking at the Form component code, it seems that the functionality should be added to rc-field-form and then update the package here in ant design.

Would you prefer to do that or extend the useForm hook here in ant design directly?

@kerm1it
Copy link
Member

kerm1it commented Nov 16, 2020

Yes, you should add feature to rc-field-form and update package.json in antd.

@ayuechuan
Copy link

你可以自己在内部状态控制 提交表单button的状态(是否禁用)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants