From 4b00ef6052362efbf8256447566d92d5a28ba3de Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Fri, 2 Aug 2024 12:37:22 +0300 Subject: [PATCH] UI: Refactoring --- .../sent/sent-notification-dialog.component.html | 1 + .../shared/components/entity/entity-list.component.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html index 16c6e1d7f9..7fadf5763b 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html @@ -104,6 +104,7 @@ ; @ViewChild('entityAutocomplete') matAutocomplete: MatAutocomplete; @ViewChild('chipList', {static: true}) chipList: MatChipGrid; @@ -187,10 +192,11 @@ export class EntityListComponent implements ControlValueAccessor, OnInit, AfterV this.modelValue = [...value]; this.entityService.getEntities(this.entityType, value).subscribe( (entities) => { - this.modelValue = entities.map(entity => entity.id.id); this.entities = entities; this.entityListFormGroup.get('entities').setValue(this.entities); - this.propagateChange(this.modelValue); + if (this.propagateOnSubscribe) { + this.propagateChange(this.modelValue); + } } ); } else {