-
Notifications
You must be signed in to change notification settings - Fork 81
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
Improve <SubmitButton/> disabled behavior or improve documentation #135
Comments
I think this is by design. The lastname field has not been touched (lets assume it might have been overlooked by the user). In this case validation errors are not rendered for this component (only touched fields with validation errors actually show the errors). In this case the submit button is enabled to allow triggering submit which in my opinion should rerun validation (either client side or server side). Then the user will get feedback whats wrong. That is why the submit button will only disable if the field has been touched (touching a field will render validation feedback). I will leave this issue open to either improve the documentation or improve the behavior (feel free to come up with ideas). |
You raise a good point. We could leave it as is and I can update the documentation if needed. |
Using
formik-antd 2.0.0-beta.3
formik 2.1.4
antd 4.0.0
When setting values in required fields, the submit button will enable even if there are other required fields without any values in them
You can try it here in the "Sample Form" page.
https://codesandbox.io/s/keen-franklin-wpefu
Fill out first name, the submit button will enable itself although lastname is required
The text was updated successfully, but these errors were encountered: