Skip to content

Commit f25dc77

Browse files
palbizuPatricio Albizu
andauthored
feat: Adding state disable to dropdown (#1385)
Co-authored-by: Patricio Albizu <[email protected]>
1 parent 4b09cac commit f25dc77

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

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

projects/components/src/select/select.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ export class SelectComponent<V> implements ControlValueAccessor, AfterContentIni
324324
this.propagateControlValueChangeOnTouch = onTouch;
325325
}
326326

327+
public setDisabledState(isDisabled?: boolean): void {
328+
this.disabled = isDisabled ?? false;
329+
}
330+
327331
private propagateValueChangeToFormControl(value: V | undefined): void {
328332
this.propagateControlValueChange?.(value);
329333
this.propagateControlValueChangeOnTouch?.(value);

0 commit comments

Comments
 (0)