-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Comments
… 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.
Actually this issue applies to other controls as well. Only Input, datepicker and autocomplete work as expected. |
This came up in #17985. |
Quick note on this... it appears the datepicker has a similar issue. The input itself seems to be disabled, but the icon that triggers the datepicker is still enabled and allows you to select a date. See demo from Skfsh: https://stackblitz.com/edit/angular-8-material-starter-template-szedxq?file=src%2Fapp%2Fapp.component.html |
… 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.
…roup with 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.
…roup with 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.
…roup with 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.
…roup with 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.
…roup with 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.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…roup with a disabled one (angular#17872) 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.
Reproduction
Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/components-issue-qr6rcq
Steps to reproduce:
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
The text was updated successfully, but these errors were encountered: