Skip to content

Recreating FormGroup with disabled attribute has different effect on matSelect vs matInput #17860

Closed
@kyletanders

Description

@kyletanders

Reproduction

Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/components-issue-qr6rcq

Steps to reproduce:

  1. Click Recreate Form button
  2. Notice that the input is disabled but the mat-select is not

Also just for comparison see that calling formControl.disable() does work as expected:
3. Reload the page
4. Click 'Disable Function' button
5. Notice both input and select are disabled as expected

Expected Behavior

What behavior were you expecting to see?
Expected matSelect and matInput to both be disabled when creating a new FormGroup where the disabled value was set to true for both of them.

Actual Behavior

What behavior did you actually see?
Only the matInput was disabled

Environment

  • Angular: 8.0.0
  • CDK/Material: 8.0.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/inputarea: material/select

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions