andrewhathaway / Winterfell

Generate complex, validated and extendable JSON-based forms in React.
http://winterfell.andrewhathaway.net
MIT License
785 stars 116 forks source link

Added fix for react warnings #83

Closed ihor-yamshchykov closed 7 years ago

ihor-yamshchykov commented 7 years ago

If you initially pass undefined or null as the value prop, the component starts life as an "uncontrolled" component. Once you interact with the component, we set a value and react changes it to a "controlled" component, and issues the warning.

Changed initial values to empty strings instead of undefined.

andrewhathaway commented 7 years ago

Thanks for the PR @ihor-yamshchykov! Also thank you for @bkozera and @dmalts for having a look through, picking up the things I would have.

However, I would appreciate it if you could submit a new PR with the changes you made but no build changes, I'll handle that part! Thanks!