Skip to content

Commit

Permalink
docs(material/select): add note about disabling the select or individ…
Browse files Browse the repository at this point in the history
…ual options (#25065)

* docs(material/select): Disabling the select or individual options

Update documentation to include ReactiveForms use case

Fixes #24762

* docs(material/select): Disabling the select or individual options

Update documentation to include ReactiveForms use case

Fixes #24762

* docs(material/select): Disabling the select or individual options

PR Feedback (add comma, add backticks)

Fixes #24762
  • Loading branch information
jljohnson001 authored Jun 12, 2022
1 parent 2c956c0 commit aadcb96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/material/select/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ In some cases that `<mat-form-field>` may use the placeholder as the label (see

It is possible to disable the entire select or individual options in the select by using the
disabled property on the `<select>` or `<mat-select>` and the `<option>` or `<mat-option>` elements respectively.
When working with Reactive Forms, the select component can be disabled/enabled via form controls.
This can be accomplished by creating a `FormControl` with the disabled property
`FormControl({value: '', disabled: true})` or using `FormControl.enable()`, `FormControl.disable()`.

<!-- example(select-disabled) -->

Expand Down

0 comments on commit aadcb96

Please sign in to comment.