Browse Source

UI: Rename input property in entity-list component

pull/11337/head
Vladyslav_Prykhodko 2 years ago
parent
commit
7044be4d53
  1. 2
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html
  2. 4
      ui-ngx/src/app/shared/components/entity/entity-list.component.ts

2
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html

@ -104,7 +104,7 @@
</ng-template>
<ng-template #recipientsList>
<tb-entity-list
syncedIdListPropagator
syncIdsWithDB
required
formControlName="targets"
labelText="{{ 'notification.recipients' | translate }}"

4
ui-ngx/src/app/shared/components/entity/entity-list.component.ts

@ -109,7 +109,7 @@ export class EntityListComponent implements ControlValueAccessor, OnInit, AfterV
@Input()
@coerceBoolean()
syncedIdListPropagator = false;
syncIdsWithDB = false;
@ViewChild('entityInput') entityInput: ElementRef<HTMLInputElement>;
@ViewChild('entityAutocomplete') matAutocomplete: MatAutocomplete;
@ -194,7 +194,7 @@ export class EntityListComponent implements ControlValueAccessor, OnInit, AfterV
(entities) => {
this.entities = entities;
this.entityListFormGroup.get('entities').setValue(this.entities);
if (this.syncedIdListPropagator && this.modelValue.length !== entities.length) {
if (this.syncIdsWithDB && this.modelValue.length !== entities.length) {
this.modelValue = entities.map(entity => entity.id.id);
this.propagateChange(this.modelValue);
}

Loading…
Cancel
Save