Skip to content

v4.1.0

Compare
Choose a tag to compare
@erikras erikras released this 02 Jan 12:55
· 1633 commits to master since this release

This release comes with a minor behavior change around initializing values.

Behavior Change

Following a rousing debate on #370, it was concluded, #370 (comment), that:

  • Initializing a form should update both the fields' initial and value values, thus guaranteeing that pristine is true after initializing.
  • A form should only be initialized on mount with the contents of the initialValues prop if that particular form has never been initialized before. This way, if you disable destroyOnUnmount, you may remount the form component with an initialValues prop without having your previously initialized values blown away.

If you require that your form be initialized on mount even if it has previously been initialized, you will have to call this.props.initializeForm(values) manually.