[angular-16-irish-monitor]: Fix input reset value on changes

This commit is contained in:
Konstantinos Triantafyllou 2023-11-15 16:13:45 +02:00
parent b8162fa1e3
commit 16b6a34d25
1 changed files with 2 additions and 1 deletions

View File

@ -478,7 +478,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
ngOnChanges(changes: SimpleChanges) {
if (this.formControl) {
if (changes.value) {
if (changes.value && changes.value.currentValue !== changes.value.previousValue) {
this.formControl.setValue(this.value);
}
if (changes.validators) {
@ -826,6 +826,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
resetValue(event: any) {
event.stopPropagation();
console.log(1)
this.formControl.setValue('');
this.focus(true, event);
}