You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recreating FormGroup with disabled attribute has different effect on matSelect vs matInput #17860
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
Activity
fix(select): disabled state out of sync when swapping form group with…
Skfsh commentedon Dec 18, 2019
Actually this issue applies to other controls as well.
https://stackblitz.com/edit/angular-8-material-starter-template-szedxq?file=src%2Fapp%2Fapp.component.html
Only Input, datepicker and autocomplete work as expected.
crisbeto commentedon Dec 18, 2019
This came up in #17985.
kyletanders commentedon Feb 26, 2020
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
fix(select): disabled state out of sync when swapping form group with…
fix(material/select): disabled state out of sync when swapping form g…
fix(material/select): disabled state out of sync when swapping form g…
fix(material/select): disabled state out of sync when swapping form g…
fix(material/select): disabled state out of sync when swapping form g…
fix(material/select): disabled state out of sync when swapping form g…
fix(material/select): disabled state out of sync when swapping form g…
fix(material/select): disabled state out of sync when swapping form g…
angular-automatic-lock-bot commentedon Apr 3, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(material/select): disabled state out of sync when swapping form g…