Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 3d5222e

Browse files
itssharmasandeepjaywalker21
authored andcommitted
feat: disabled state for input component reactive forms (hypertrace#1333)
1 parent f9b9cba commit 3d5222e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/components/src/input/input.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ export class InputComponent<T extends string | number> implements ControlValueAc
8686
public registerOnTouched(onTouch: (value: T | undefined) => void): void {
8787
this.propagateControlValueChangeOnTouch = onTouch;
8888
}
89+
public setDisabledState(isDisabled?: boolean): void {
90+
this.disabled = isDisabled ?? false;
91+
}
8992

9093
private coerceValueIfNeeded(value?: string): T | undefined {
9194
switch (this.type) {

0 commit comments

Comments
 (0)