Releases: final-form/react-final-form
Releases · final-form/react-final-form
v3.0.2
v3.0.1
v3.0.0
v2.2.0
New Features
- Checkboxes will now manage lists of values if you provide a
valueprop. If you do not provide avalueprop, 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"/>FormSpynow receives all the good Form API props thatFormgets.change,blur,initialize, etc. #101 #105
Bug Fixes
Typescript
v2.1.1
v2.1.0
v2.0.0
Bug Fixes
- Fixed
devDependenciesto be compatible withprop-typespackage. #67
New Features
- Upgraded to be compatible with
[email protected], which allows:- New
isEqualprop can be given toFieldto be used in calculatingpristine/dirty. Defaults to===. - New
validateFieldsprop can be given toFieldto 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. SeevalidateFieldsdocs.
- 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)
}}/>