UI: Entity autocomplete error handling

This commit is contained in:
Igor Kulikov 2020-04-17 15:13:19 +03:00
parent eb4334937c
commit a487914dcb

View File

@ -235,7 +235,7 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
},
() => {
this.modelValue = null;
this.selectEntityFormGroup.get('entity').patchValue(null, {emitEvent: false});
this.selectEntityFormGroup.get('entity').patchValue('', {emitEvent: false});
if (value !== null) {
this.propagateChange(this.modelValue);
}
@ -250,7 +250,7 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
},
() => {
this.modelValue = null;
this.selectEntityFormGroup.get('entity').patchValue(null, {emitEvent: false});
this.selectEntityFormGroup.get('entity').patchValue('', {emitEvent: false});
if (value !== null) {
this.propagateChange(this.modelValue);
}