diff --git a/ui-ngx/src/app/shared/components/device/gateway-configuration.component.html b/ui-ngx/src/app/shared/components/device/gateway-configuration.component.html
index 8949f5015c..f4e5e364d0 100644
--- a/ui-ngx/src/app/shared/components/device/gateway-configuration.component.html
+++ b/ui-ngx/src/app/shared/components/device/gateway-configuration.component.html
@@ -653,6 +653,7 @@
diff --git a/ui-ngx/src/app/shared/components/device/gateway-configuration.component.ts b/ui-ngx/src/app/shared/components/device/gateway-configuration.component.ts
index 5f0e0ae40d..a99a23eff1 100644
--- a/ui-ngx/src/app/shared/components/device/gateway-configuration.component.ts
+++ b/ui-ngx/src/app/shared/components/device/gateway-configuration.component.ts
@@ -473,6 +473,8 @@ export class GatewayConfigurationComponent implements OnInit {
this.attributeService.saveEntityAttributes(this.device, AttributeScope.SHARED_SCOPE, attributes).subscribe(_ => {
if (this.dialogRef) {
this.dialogRef.close();
+ } else {
+ this.gatewayConfigGroup.markAsPristine();
}
});
}
diff --git a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html
index bb0a28cd07..809a8cb44d 100644
--- a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html
+++ b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.html
@@ -113,6 +113,7 @@
diff --git a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts
index 2a985a7113..4635b7fe56 100644
--- a/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts
+++ b/ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts
@@ -89,6 +89,9 @@ export class GatewayConnectorComponent implements OnInit {
this.gatewayConnectorsGroup = this.fb.group({
connectors: this.fb.array([], [Validators.required])
});
+ this.gatewayConnectorsGroup.valueChanges.subscribe(_=>{
+ this.cd.detectChanges();
+ });
this.getConnectorsData();
}
@@ -133,6 +136,9 @@ export class GatewayConnectorComponent implements OnInit {
]).subscribe(_=> {
if (this.dialogRef) {
this.dialogRef.close();
+ } else {
+ this.gatewayConnectorsGroup.markAsPristine();
+ this.cd.detectChanges();
}
});
}