lwm2m: front fix bug profile updateObserve
This commit is contained in:
parent
8b23bd999f
commit
23373b055e
@ -55,12 +55,14 @@
|
||||
</div>
|
||||
<div fxFlex="10">
|
||||
<mat-checkbox formControlName="attribute" color="warn"
|
||||
[checked]="updateObserve(i)"
|
||||
matTooltip="{{'device-profile.lwm2m.is-attr-tip' | translate}}"
|
||||
matTooltipPosition="above">
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
<div fxFlex="10">
|
||||
<mat-checkbox formControlName="telemetry" color="primary"
|
||||
[checked]="updateObserve(i)"
|
||||
matTooltip="{{'device-profile.lwm2m.is-telemetry-tip' | translate}}"
|
||||
matTooltipPosition="above">
|
||||
</mat-checkbox>
|
||||
|
||||
@ -124,4 +124,10 @@ export class Lwm2mObserveAttrTelemetryResourceComponent implements ControlValueA
|
||||
trackByParams = (index: number): number => {
|
||||
return index;
|
||||
}
|
||||
|
||||
updateObserve = (index: number): void =>{
|
||||
if (this.resourceFormArray.at(index).value.attribute === false && this.resourceFormArray.at(index).value.telemetry === false) {
|
||||
this.resourceFormArray.at(index).patchValue({observe: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user