Skip to content

[Form] Add the prop isReadOnly to the Form component #808

@nicmell

Description

@nicmell

The pull request #807 introduced the prop isReadOnly on the FormItem component to specify if the field is modifiable o read-only.
It would be desirable to add the prop isReadOnly to the root Form component to control the behaviour of every item in a single place.
The requirement suggests the implementation of a custom React.Context to hold the value of the prop, and having each FormItem reading from the context to infer its default read-only status (passing the prop directly to the FormItem should override the behaviour specified by the parent Form component).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Form componentForm component and hooks related activitiesFormItem componentFormItem component and hooks related activitiesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions