v2.0.0
Bug Fixes
- Fixed
devDependencies
to be compatible withprop-types
package. #67
New Features
- Upgraded to be compatible with
[email protected]
, which allows:- New
isEqual
prop can be given toField
to be used in calculatingpristine
/dirty
. Defaults to===
. - New
validateFields
prop can be given toField
to specifically name other fields to run field-level validation on when that field changes. You can also pass[]
to run field-level validation only on the field that has changed. SeevalidateFields
docs.
- New
⚠️ BREAKING CHANGES ⚠️
- Upgraded to be compatible with
[email protected]
#69, which provides access to the form api inonSubmit
:
In v1.x.x
:
<Form onSubmit={values => {
const promise = sendToServer(values)
return promise
}}/>
OR
<Form onSubmit={(values, callback) => {
sendToServer(values, callback)
}}/>
In v2.x.x
:
<Form onSubmit={(values, form) => {
// ^^^^^^ -------------------- 🆕
const promise = sendToServer(values)
return promise
}}/>
OR
<Form onSubmit={(values, form, callback) => {
// ^^^^^^ -------------------- 🆕
sendToServer(values, callback)
}}/>