AppliedMathematicsANU / plexus-form

A dynamic form component for react using JSON-Schema.
MIT License
134 stars 31 forks source link

Setting input value on render causes validation error #44

Open sambev opened 9 years ago

sambev commented 9 years ago

I have a field that I am setting the value on at render time. When I submit the form, without entering/changing the field, I get a validation error that says the field must be present.

After reading through the code I noticed that the inputs value is indeed set, but since the input's handleChange function never gets called, the state never actually gets set on the form so the form doesn't think that field has a value.

Any thoughts?