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
You should be able to enable a disabled slide toggle so that the user can both drag and click the slide toggle to change its value.
What is the current behavior?
If a slide toggle is initialized as disabled or if the slide toggle is clicked while disabled, then a "disabled"-attribute is set on the element.
The "disabled"-attribute doesn't get removed when the slide toggle is enabled using the enable() function. The "mat-disabled"-class is added and removed as expected.
The "disabled"-attribute also doesn't get set after a disable() function call.
While the "disabled"-attribute is set on the element, the user can't click the slide toggle to change the value.
Dragging the slide toggle changes the value and removes the "disabled"-attribute.
What are the steps to reproduce?
Try to enable the second slide toggle by changing the value of the first.
It isn't possible to change the value by clicking the slide toggle or the label.
When setting the disabled state of a slide-toggle using the FormControl's `enable()` and `disable()` methods the slide-toggle's view won't be updated properly.
Fixesangular#4774
When setting the disabled state of a slide-toggle using the FormControl's `enable()` and `disable()` methods the slide-toggle's view won't be updated properly.
Fixes#4774
Bug, feature request, or proposal:
Bug
What is the expected behavior?
You should be able to enable a disabled slide toggle so that the user can both drag and click the slide toggle to change its value.
What is the current behavior?
If a slide toggle is initialized as disabled or if the slide toggle is clicked while disabled, then a "disabled"-attribute is set on the element.
The "disabled"-attribute doesn't get removed when the slide toggle is enabled using the enable() function. The "mat-disabled"-class is added and removed as expected.
The "disabled"-attribute also doesn't get set after a disable() function call.
While the "disabled"-attribute is set on the element, the user can't click the slide toggle to change the value.
Dragging the slide toggle changes the value and removes the "disabled"-attribute.
What are the steps to reproduce?
Try to enable the second slide toggle by changing the value of the first.
It isn't possible to change the value by clicking the slide toggle or the label.
http://plnkr.co/edit/rs1YsefeDTB5UZpJ9H6L?p=preview
What is the use-case or motivation for changing an existing behavior?
Desktop users may not find it natural that they have to drag the slide toggle with the mouse to change the value in this scenario.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4, Material master & beta5, 2.2, Chrome
The text was updated successfully, but these errors were encountered: