Browse Source

[PROD-3727] [FIX] refactoring

pull/10981/head
mpetrov 2 years ago
parent
commit
4990db2dc0
  1. 16
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector.component.ts

16
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-service-rpc-connector.component.ts

@ -143,12 +143,7 @@ export class GatewayServiceRPCConnectorComponent implements OnInit, OnDestroy, C
}
});
this.isMQTTWithResponse = this.fb.control(false);
this.isMQTTWithResponse.valueChanges.pipe(
tap(() => {
this.commandForm.get('responseTopicExpression').updateValueAndValidity();
}),
takeUntil(this.destroy$),
).subscribe();
this.observeMQTTWithResponse();
}
ngOnDestroy(): void {
@ -452,4 +447,13 @@ export class GatewayServiceRPCConnectorComponent implements OnInit, OnDestroy, C
return null;
};
}
private observeMQTTWithResponse(): void {
this.isMQTTWithResponse.valueChanges.pipe(
tap(() => {
this.commandForm.get('responseTopicExpression').updateValueAndValidity();
}),
takeUntil(this.destroy$),
).subscribe();
}
}

Loading…
Cancel
Save