Fixed bug with UI updating of bootstrap-config for LwM2M device-profiles

This commit is contained in:
Sergey Tarnavskiy 2021-11-19 16:08:56 +02:00
parent 31a1af5814
commit c532bc6508

View File

@ -14,7 +14,7 @@
/// limitations under the License. /// limitations under the License.
/// ///
import { Component, forwardRef, Input, OnDestroy } from '@angular/core'; import { ChangeDetectorRef, Component, forwardRef, Input, OnDestroy } from '@angular/core';
import { import {
ControlValueAccessor, ControlValueAccessor,
FormBuilder, FormBuilder,
@ -95,6 +95,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
} }
constructor(private fb: FormBuilder, constructor(private fb: FormBuilder,
private cd: ChangeDetectorRef,
private deviceProfileService: DeviceProfileService) { private deviceProfileService: DeviceProfileService) {
this.lwm2mDeviceProfileFormGroup = this.fb.group({ this.lwm2mDeviceProfileFormGroup = this.fb.group({
objectIds: [null], objectIds: [null],
@ -236,6 +237,7 @@ export class Lwm2mDeviceProfileTransportConfigurationComponent implements Contro
this.lwm2mDeviceProfileFormGroup.get('clientLwM2mSettings.fwUpdateStrategy').updateValueAndValidity({onlySelf: true}); this.lwm2mDeviceProfileFormGroup.get('clientLwM2mSettings.fwUpdateStrategy').updateValueAndValidity({onlySelf: true});
this.lwm2mDeviceProfileFormGroup.get('clientLwM2mSettings.swUpdateStrategy').updateValueAndValidity({onlySelf: true}); this.lwm2mDeviceProfileFormGroup.get('clientLwM2mSettings.swUpdateStrategy').updateValueAndValidity({onlySelf: true});
} }
this.cd.detectChanges();
} }
private updateModel = (): void => { private updateModel = (): void => {