UI: fixed coping of instances when deleting lwm2m objects

This commit is contained in:
rusikv 2024-09-23 13:32:41 +03:00
parent 221e17789a
commit 8d59917ba5

View File

@ -530,8 +530,10 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
this.removeObserveAttrTelemetryFromJson(ATTRIBUTE, value.keyId); this.removeObserveAttrTelemetryFromJson(ATTRIBUTE, value.keyId);
this.removeKeyNameFromJson(value.keyId); this.removeKeyNameFromJson(value.keyId);
this.removeAttributesFromJson(value.keyId); this.removeAttributesFromJson(value.keyId);
this.updateObserveAttrTelemetryObjectFormGroup(objectsOld); this.lwm2mDeviceProfileFormGroup.patchValue({
} observeAttrTelemetry: deepClone(objectsOld)
}, {emitEvent: false});
};
private removeObserveAttrTelemetryFromJson = (observeAttrTel: string, keyId: string): void => { private removeObserveAttrTelemetryFromJson = (observeAttrTel: string, keyId: string): void => {
const isIdIndex = (element) => element.startsWith(`/${keyId}`); const isIdIndex = (element) => element.startsWith(`/${keyId}`);