Skip to content

Commit 82e3dcf

Browse files
committed
refactor(switch): implement setDisabledState method
1 parent 6b8e9c9 commit 82e3dcf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

projects/igniteui-angular/src/lib/switch/switch.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ export class IgxSwitchComponent implements ControlValueAccessor, EditorProvider
341341
this._checked = value;
342342
}
343343
}
344+
344345
/**
345346
* @hidden
346347
* @internal
@@ -375,6 +376,11 @@ export class IgxSwitchComponent implements ControlValueAccessor, EditorProvider
375376
public registerOnTouched(fn: () => void) {
376377
this._onTouchedCallback = fn;
377378
}
379+
380+
/** @hidden @internal */
381+
public setDisabledState(isDisabled: boolean) {
382+
this.disabled = isDisabled;
383+
}
378384
}
379385

380386
export const IGX_SWITCH_REQUIRED_VALIDATOR: Provider = {

0 commit comments

Comments
 (0)