Skip to content

feat(inputs): Add [readonly] property to input components #27955

Open
@e-oz

Description

Feature Description

Right now input components (checkbox, chips, datepicker, form field, radio button, select, slider) have [disabled] property. Only matInput directive has [readonly].

[disabled] property conflicts with the [formControl] directive, which has a property with the same name.

So if you use [formControl] with the components listed above, it is not possible to use their [disabled] property.

Use Case

[disabled] controls will not be included in form.value - sometimes you need to render an input element as read-only but still send its value to the server.

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions