- ability to actively not initialize value if initialData's value is set to
null
- removed
_initial
fields from all passed data and state props - fixed a bug that rendered initial forms with empty data
- refactored underlying structures in order to support re-initialisation and more stable form resets.
- fixed React setState errors.
- Form's initial render is now skipped by default as it is not populated with data yet. It will automatically rerender once.
This major release removes all old APIs (including HoCs) and reduces the whole API to just two simple components Field and Form.
Check the Migration Guide for more information on how to migrate older versions.
This new major release was an accidently released major version introducing the new render-props APIs. It did modify the existing Form component a bit, but was still backwards-compatible.
- do not pass
initialState
to the underlaying<form>
-element
- pass the enhanced
onSubmit
rather than the pureonSubmit
to the form
- do not pass
initialFields
to the underlaying<form>
-element
- introducing
asUpdate
to injectupdateField
andupdateState
into any React component
- do not call
onChange
during form initialization
- fixed a bug where
isTouched
was not updated correctly
- added some simple helper
- preserve initial data and state on
resetForm
- fixed
resetForm
actions in Form's onSubmit andasReset
- fixed an resolving issue in Form
- improved action dispatcher
asField
's second parameterdefaultField
now also accepts a function of props that returns the default field data as an object
- added the
withState
-HOC to provide form state to components - now passing
state
andupdateState
to both Form'sonChange
andonSubmit
- passing
state
andupdateState
to theasField
-HOC
- added the
ownProps
(second) parameter towithData
- andwithState
-HOC - added the
defaultData
(second) parameter to theasField
-HOC - passing
previousData
to Form'sonChange
- Ability to disable auto-execution of
event.preventDefault
on submit
Initial Release