Skip to content

Commit 636ae5c

Browse files
crisbetoandrewseguin
authored andcommitted
fix(material-experimental/mdc-slide-toggle): update adapter to match new interface (#18124)
The `MDCSwitchAdapter` was changed in the most-recent canary release which is breaking the CI check.
1 parent 697c3a0 commit 636ae5c

File tree

3 files changed

+512
-509
lines changed

3 files changed

+512
-509
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@types/youtube": "^0.0.38",
5555
"@webcomponents/custom-elements": "^1.1.0",
5656
"core-js": "^2.6.9",
57-
"material-components-web": "5.0.0-canary.c6808c51c.0",
57+
"material-components-web": "5.0.0-canary.b602226ce.0",
5858
"rxjs": "^6.5.3",
5959
"systemjs": "0.19.43",
6060
"tslib": "^1.10.0",

src/material-experimental/mdc-slide-toggle/slide-toggle.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ export class MatSlideToggle implements ControlValueAccessor, AfterViewInit, OnDe
9595
removeClass: className => this._switchElement.nativeElement.classList.remove(className),
9696
setNativeControlChecked: checked => this._checked = checked,
9797
setNativeControlDisabled: disabled => this._disabled = disabled,
98+
setNativeControlAttr: (name, value) => {
99+
this._inputElement.nativeElement.setAttribute(name, value);
100+
}
98101
};
99102

100103
/** Whether the slide toggle is currently focused. */

0 commit comments

Comments
 (0)