-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When we set the disabled
state of the MatSelect programmatically to undefined
the component crashes and gives a lot of errors like this:
TypeError: can't access property "toString", ctx.disabled is undefined
Angular 4
MatSelect_HostBindings
processHostBindingOpCodes
refreshView
detectChangesInView
Reproduction
StackBlitz link: https://stackblitz.com/edit/mat-select-disabled-undefined?file=src%2Fmain.ts
(The MatSelect is not properly working in StackBlitz. I don't know why, but I tested it locally and there I get the error)
Steps to reproduce:
- Add mat-select to a template
- Set the
disabled
attribute toundefined
programmatically
Expected Behavior
When the disabled state for MatSelect is set programmatically to undefined
, it should behave like it is has the value false
and not crash
Actual Behavior
Component stops working and is giving a lot of error messages
Environment
- Angular: 20.1.1
- CDK/Material: 20.0.5
- Browser(s): Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): maxOs Sequoia 15.6
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team