Skip to content

Use top-level disabled prop on useForm to disable forms #1895

@david-crespo

Description

@david-crespo

#1893 handles instance create, which is the worst offender because the POST takes a long time to come back. But strictly speaking, every other form has the same problem. We could manually wire up every form with disabled props on every field, like in #1893, but it would probably be better if we could find a more automatic way.

Someone asked about this here but didn't get an answer:

https://github.com/orgs/react-hook-form/discussions/11171
https://github.com/orgs/react-hook-form/discussions/11057

RHF recently (in v7.48.0) added a way to pass disabled to useForm, and then it might automatically get passed into all registered fields. Worth exploring!

react-hook-form/react-hook-form#10496

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