Skip to content

Commit 0465e8d

Browse files
committed
fix input value issue
1 parent bea2f94 commit 0465e8d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

projects/social_platform/src/app/ui/components/input/input.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ import { MatFormFieldModule } from "@angular/material/form-field";
3535
],
3636
})
3737
export class InputComponent implements ControlValueAccessor {
38-
constructor() {}
39-
4038
@Input() placeholder = "";
4139
@Input() type: "text" | "password" | "email" | "tel" | "date" | "radio" = "text";
4240
@Input() size: "small" | "big" = "small";
@@ -144,7 +142,9 @@ export class InputComponent implements ControlValueAccessor {
144142
}
145143

146144
writeValue(value: string | null): void {
147-
this.value = value ?? "";
145+
setTimeout(() => {
146+
this.value = value ?? "";
147+
});
148148
}
149149

150150
onChange: (value: string) => void = () => {};

0 commit comments

Comments
 (0)