[angular-16-irish-monitor]: Fix input reset value on changes
This commit is contained in:
parent
b8162fa1e3
commit
16b6a34d25
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue