From 8d59917ba53e1c2707ed286642618216c6876268 Mon Sep 17 00:00:00 2001 From: rusikv Date: Mon, 23 Sep 2024 13:32:41 +0300 Subject: [PATCH] UI: fixed coping of instances when deleting lwm2m objects --- ...wm2m-device-profile-transport-configuration.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts index 0bda4c08c2..08e1de73f2 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component.ts @@ -530,8 +530,10 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro this.removeObserveAttrTelemetryFromJson(ATTRIBUTE, value.keyId); this.removeKeyNameFromJson(value.keyId); this.removeAttributesFromJson(value.keyId); - this.updateObserveAttrTelemetryObjectFormGroup(objectsOld); - } + this.lwm2mDeviceProfileFormGroup.patchValue({ + observeAttrTelemetry: deepClone(objectsOld) + }, {emitEvent: false}); + }; private removeObserveAttrTelemetryFromJson = (observeAttrTel: string, keyId: string): void => { const isIdIndex = (element) => element.startsWith(`/${keyId}`);