Skip to content

Is it possible to use final-form-focus without using <form> tag? #15

@marrkeri

Description

@marrkeri

Check this demo: https://codesandbox.io/s/react-final-form-focus-on-first-error-ib23b

If you avoid <form> tag and you use just
<button onClick={form.submit} disabled={submitting}>Submit</button>, validation is provided but focus is not there.

Problem with <form onSubmit={handleSubmit} /> is that, that even Enter on textbox will trigger it or even worse every other button without specifying type="".
It would be also helpful to have it without <form> tag

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