Skip to content

Focus not working with FieldArray and server side validation #33

@vrobert-ipsosenso

Description

@vrobert-ipsosenso

Are you submitting a bug report or a feature request?

bug

What is the current behavior?

  1. Create a form with a field array (subForm in the demo) and one field (firstName in the demo)
  2. Add validation to subForm's fields
  3. Add server side validation to firstName
  4. Trigger only the server side validation
  5. The error is displayed, but firstName isn't focused

What is the expected behavior?

firstName should be focused

Sandbox Link

https://codesandbox.io/s/react-final-form-focus-on-first-error-forked-vz1kh?file=/src/validate.js

What's your environment?

final-form 4.20.2
final-form-arrays 3.0.2
final-form-focus 1.1.2
react 16.13.1
react-dom 16.13.1
react-final-form 6.5.0
react-final-form-arrays 3.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions