Skip to content

Commit 2b80f34

Browse files
jljohnson001crisbeto
authored andcommitted
docs(material/select): add note about disabling the select or individual 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 (cherry picked from commit aadcb96)
1 parent 59268fa commit 2b80f34

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/material/select/select.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ In some cases that `<mat-form-field>` may use the placeholder as the label (see
5454

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

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

0 commit comments

Comments
 (0)