Skip to content

Commit

Permalink
[email protected] compatibility (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikras authored Mar 4, 2019
1 parent e01de85 commit efb81c2
Show file tree
Hide file tree
Showing 6 changed files with 12,268 additions and 23 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,12 @@ as any non-API props passed into the `<Field/>` component.
A component that is given [`FieldRenderProps`](#fieldrenderprops) as props, children and render props, as
well as any non-API props passed into the `<Field/>` component.

#### `defaultValue?: any`

⚠️ You probably want `initialValue`! ⚠️

_**Before using this prop, read and understand the 🏁 Final Form documentation on [`initialValue`](https://github.com/final-form/final-form#initialvalue-any) and [`defaultValue`](https://github.com/final-form/final-form#defaultvalue-any)!**_

#### `format?: ((value: any, name: string) => any) | null`

A function that takes the value from the form values and the name of the field and formats the value to give to the input. Common use cases include converting javascript `Date` values into a localized date string. Almost always used in conjunction with `parse`.
Expand All @@ -508,6 +514,10 @@ A function that takes the value from the form values and the name of the field a

If `true`, the `format` function will only be called when the field is blurred. If `false`, `format` will be called on every render. Defaults to `false`.

#### `initialValue?: any`

[See the 🏁 Final Form docs on `initialValue`](https://github.com/final-form/final-form# #initialvalue-any)

#### `isEqual?: (a: any, b: any) => boolean`

[See the 🏁 Final Form docs on `isEqual`](https://github.com/final-form/final-form#isequal-a-any-b-any--boolean).
Expand Down Expand Up @@ -615,6 +625,10 @@ The current value of the field.

[See the 🏁 Final Form docs on `invalid`](https://github.com/final-form/final-form#invalid-boolean).

#### `meta.modified?: boolean`

[See the 🏁 Final Form docs on `modified`](https://github.com/final-form/final-form#modified-boolean).

#### `meta.pristine?: boolean`

[See the 🏁 Final Form docs on `pristine`](https://github.com/final-form/final-form#pristine-boolean).
Expand Down
Loading

0 comments on commit efb81c2

Please sign in to comment.