Releases: final-form/react-final-form
Releases · final-form/react-final-form
v3.0.0
v2.2.0
New Features
- Checkboxes will now manage lists of values if you provide a
value
prop. If you do not provide avalue
prop, checkboxes will manage boolean values as they always have. #90 #104 For example, the following inputs will manage an array of strings:
<Field name="toppings" component="input" type="checkbox" value="onions"/>
<Field name="toppings" component="input" type="checkbox" value="sausage"/>
<Field name="toppings" component="input" type="checkbox" value="pepperoni"/>
FormSpy
now receives all the good Form API props thatForm
gets.change
,blur
,initialize
, etc. #101 #105
Bug Fixes
Typescript
v2.1.1
v2.1.0
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)
}}/>
v1.2.1
v1.2.0
v1.1.1
v1.1.0
Features
- Support for 🏁 Final Form
v1.2.0
's mutator syntax.