Open DragorWW opened 5 years ago
having the same issue, but mine is only one form
it focuses on the error that you focus last, it seems your example also has similar behavior
That happens because createDecorator
search invalid input with specific name in all forms:
and focuses on first its get:
Use getFormInputs
to search for invalid input only in specific form, here is example:
https://codesandbox.io/embed/react-final-form-focus-on-first-error-hvzhm
@DragorWW @tylim88 ^
@erikras Hi! Can you please approve my PR, that corrects this misconception in the documentation?
example: https://codesandbox.io/s/818ov6pok0
case:
What is the current behavior?
input in first form get focus
What is the expected behavior?
input in last form get focus