diff --git a/README.md b/README.md index 3c9a36f..17376e7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) Decorator for [🏁 Final Form](https://github.com/final-form/final-form) that -will attempt to apply focus to the first field with an error upon an attempted form submission. +will attempt to apply focus to the first field with specific name with an error among all forms upon an attempted form submission. --- @@ -98,6 +98,10 @@ const focusOnErrors = createDecorator() Demonstrates how 🏁 Final Form Focus 🧐 works with [🏁 React Final Form](https://github.com/final-form/react-final-form#-react-final-form). +### [Focus On Errors With Multiple Forms Example](https://codesandbox.io/embed/react-final-form-focus-on-first-error-hvzhm) + +Demonstrates how to use `getFormInputs` from 🏁 Final Form Focus 🧐 to works with multiple [🏁 React Final Form](https://github.com/final-form/react-final-form#-react-final-form). + ## API ### `createDecorator: (getInputs?: GetInputs, findInput?: FindInput) => Decorator`