UI: Fixed switch control widget, didn't update state after get value in call rpc
This commit is contained in:
parent
5bb252b418
commit
766594a7aa
@ -121,7 +121,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
||||
|
||||
this.switchResize$ = new ResizeObserver(() => {
|
||||
this.resize();
|
||||
})
|
||||
});
|
||||
this.switchResize$.observe(this.switchContainerRef.nativeElement);
|
||||
this.init();
|
||||
}
|
||||
@ -260,6 +260,7 @@ export class SwitchComponent extends PageComponent implements OnInit, OnDestroy
|
||||
this.ctx.controlApi.sendTwoWayCommand(this.getValueMethod, null, this.requestTimeout).subscribe(
|
||||
(responseBody) => {
|
||||
this.setValue(this.parseValueFunction(responseBody));
|
||||
this.ctx.detectChanges();
|
||||
},
|
||||
() => {
|
||||
const errorText = this.ctx.defaultSubscription.rpcErrorText;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user