From 58c12d1212c4a1276c7b3899ef27a85b75895752 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Thu, 4 Feb 2021 13:06:22 +0200 Subject: [PATCH] Fixed merge additional info at updated entity --- .../home/components/entity/entity-details-panel.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts b/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts index 0af4689a18..1efcc9211e 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/entity/entity-details-panel.component.ts @@ -44,7 +44,7 @@ import { EntityAction } from '@home/models/entity/entity-component.models'; import { Subscription } from 'rxjs'; import { MatTab, MatTabGroup } from '@angular/material/tabs'; import { EntityTabsComponent } from '@home/components/entity/entity-tabs.component'; -import { deepClone } from '@core/utils'; +import { deepClone, mergeDeep } from '@core/utils'; @Component({ selector: 'tb-entity-details-panel', @@ -280,7 +280,7 @@ export class EntityDetailsPanelComponent extends PageComponent implements OnInit saveEntity() { if (this.detailsForm.valid) { - const editingEntity = {...this.editingEntity, ...this.entityComponent.entityFormValue()}; + const editingEntity = mergeDeep(this.editingEntity, this.entityComponent.entityFormValue()); this.entitiesTableConfig.saveEntity(editingEntity).subscribe( (entity) => { this.entity = entity;