christianalfoni / formsy-react

A form input builder and validator for React JS
MIT License
2.6k stars 438 forks source link

value vrs defaultValue #480

Closed jcalfee closed 6 years ago

jcalfee commented 6 years ago

Is it possible to have these two properties act in a standard way? If a value is provide it should close the onChange value loop and remain in sync with the external state (instead of the Formsy value) in affect over-ridding it. If defaultValue is provided it should be used for reset..

I'm hesitating to use it because I'm generating a password or allowing entry by hand and having value in my password Input element actually behave like defaultValue would make the code unclear. I really don't want to confuse passwords..

https://github.com/christianalfoni/formsy-react/blob/master/API.md#value

jcalfee commented 6 years ago

Never-mind, I see value and onChange working as one might expect.