Browse Source

hotfix v2

pull/8337/head
Maksym Dudnik 4 years ago
parent
commit
5aa9398a61
  1. 1
      ui-ngx/src/app/shared/components/device/gateway-configuration.component.html
  2. 2
      ui-ngx/src/app/shared/components/device/gateway-configuration.component.ts
  3. 1
      ui-ngx/src/app/shared/components/device/gateway-connectors.component.html
  4. 6
      ui-ngx/src/app/shared/components/device/gateway-connectors.component.ts

1
ui-ngx/src/app/shared/components/device/gateway-configuration.component.html

@ -653,6 +653,7 @@
<button mat-button color="primary"
type="button"
cdkFocusInitial
*ngIf="dialogRef"
(click)="cancel()">
{{ 'action.cancel' | translate }}
</button>

2
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();
}
});
}

1
ui-ngx/src/app/shared/components/device/gateway-connectors.component.html

@ -113,6 +113,7 @@
<button mat-button color="primary"
class="action-btns"
type="button"
*ngIf="dialogRef"
(click)="cancel()">
{{ 'action.cancel' | translate }}
</button>

6
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();
}
});
}

Loading…
Cancel
Save