From a487914dcba3c92296d58d0d312e278f64f8c51d Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 17 Apr 2020 15:13:19 +0300 Subject: [PATCH] UI: Entity autocomplete error handling --- .../shared/components/entity/entity-autocomplete.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts index 9fc5109450..893d746afc 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts +++ b/ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts @@ -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); }