UI: LwM2M device profile resource fixed disabled observe checkbox
This commit is contained in:
parent
bd558ed4c6
commit
194200da49
@ -164,6 +164,7 @@ export class Lwm2mObserveAttrTelemetryResourcesComponent implements ControlValue
|
||||
form.get('attribute').valueChanges.pipe(startWith(resource.attribute), takeUntil(this.destroy$)),
|
||||
form.get('telemetry').valueChanges.pipe(startWith(resource.telemetry), takeUntil(this.destroy$))
|
||||
]).subscribe(([attribute, telemetry]) => {
|
||||
if (!this.disabled) {
|
||||
if (attribute || telemetry) {
|
||||
form.get('observe').enable({emitEvent: false});
|
||||
} else {
|
||||
@ -171,6 +172,7 @@ export class Lwm2mObserveAttrTelemetryResourcesComponent implements ControlValue
|
||||
form.get('observe').patchValue(false, {emitEvent: false});
|
||||
form.get('attributes').patchValue({}, {emitEvent: false});
|
||||
}
|
||||
}
|
||||
});
|
||||
return form;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user