Skip to content

Commit 75b1d68

Browse files
committed
Added focus on first error example
1 parent 8fe82ac commit 75b1d68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const MyForm = () => (
134134
* [Redux Example](#redux-example)
135135
* [Conditional Fields](#conditional-fields)
136136
* [Listening for External Changes](#listening-for-external-changes)
137+
* [Focus On First Error](#focus-on-first-error)
137138
* [Rendering](#rendering)
138139
* [API](#api)
139140
* [`Field : React.ComponentType<FieldProps>`](#field--reactcomponenttypefieldprops)
@@ -347,6 +348,10 @@ Sometimes you might want to conditionally show or hide some parts of your form d
347348

348349
By wrapping a stateful `ExternalModificationDetector` component in a `Field` component, we can listen for changes to a field's value, and by knowing whether or not the field is active, deduce when a field's value changes due to external influences.
349350

351+
### [Focus On First Error](https://codesandbox.io/s/6174kqr403)
352+
353+
Demonstrates how to incorporate the [🏁 Final Form Focus 🧐](https://github.com/final-form/final-form-focus) decorator to provide this functionality out of the box.
354+
350355
## Rendering
351356

352357
There are three ways to tell `<Form/>` and `<Field/>` what to render:

0 commit comments

Comments
 (0)