Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

kyletanders opened this issue Dec 2, 2019 · 0 comments · May be fixed by #17872


Copy link

@kyletanders kyletanders commented Dec 2, 2019


Use StackBlitz to reproduce your issue:

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


  • Angular: 8.0.0
  • CDK/Material: 8.0.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@crisbeto crisbeto self-assigned this Dec 4, 2019
@crisbeto crisbeto added has pr P3 labels Dec 4, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 4, 2019
… a disabled one

Fixes the disabled state of a `mat-select` falling out of sync with its form control if the control's group is swapped out with one that is disabled on init.

Fixes angular#17860.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.