Auto-submitting the form on blur? #2494
-
We have a requirement, that there should be no submit button on our form but instead it should auto-submit on every blur and send the data to the server, but only if all the fields are passing the validation. Currently we do it this way:
And our form config and
However this doesn't as expected. When Here's a sandbox demonstrating my problem: https://codesandbox.io/s/musing-dhawan-f13kn . Am we doing something very non-standard here? Is there a better pattern to get what we want, without the outdated validation issue and without manually listening to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
can you share a simple codesandbox? |
Beta Was this translation helpful? Give feedback.
-
It would be more interesting to pass an onSubmit function to the formProvider and that this function be executed after the blur event of an input is triggerd (only if the validation is valid), or am I totally wrong? Somethig like this :
|
Beta Was this translation helpful? Give feedback.
It would be more interesting to pass an onSubmit function to the formProvider and that this function be executed after the blur event of an input is triggerd (only if the validation is valid), or am I totally wrong?
Somethig like this :