react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

onBlur example

Open alexandroscgb opened this issue 7 years ago • 2 comments

Hi.

I'm to react so I don't know how to annotate a field with the onBlur event and define inside the playground. The playground have a different syntax to the examples in the documentation page. Could someone give me an example of an onBlur event on a field?

Thank you.

alexandroscgb avatar Jun 20 '17 19:06 alexandroscgb

I'm also curious about this. It doesn't seem like you have access to formData the same way you do with onChange, which I would prefer not to use because it's pretty intrusive on long fields and onSubmit, which is too far from the user behaviour. There was a pull request accepted to implement this in .42 but the documentation wasn't updated.

maybe you could save the form state on the onChange use that on the onBlur to validate etc

ml242 avatar Jun 27 '17 19:06 ml242

I've been looking for an example as well, couldn't find anything, all my problems would be solved if async validation was supported.

nikhil-ks avatar Jul 23 '18 10:07 nikhil-ks