Browse Source

added suggestions

pull/11235/head
mpetrov 2 years ago
parent
commit
30f57ecd5a
  1. 7
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-security-config/modbus-security-config.component.ts

7
ui-ngx/src/app/modules/home/components/widget/lib/gateway/connectors-configuration/modbus/modbus-security-config/modbus-security-config.component.ts

@ -96,11 +96,6 @@ export class ModbusSecurityConfigComponent implements ControlValueAccessor, Vali
}); });
this.observeValueChanges(); this.observeValueChanges();
} }
if (this.disabled) {
this.securityConfigFormGroup.disable({emitEvent:false});
} else {
this.securityConfigFormGroup.enable({emitEvent:false});
}
} }
ngOnDestroy(): void { ngOnDestroy(): void {
@ -152,7 +147,7 @@ export class ModbusSecurityConfigComponent implements ControlValueAccessor, Vali
this.securityConfigFormGroup.valueChanges.pipe( this.securityConfigFormGroup.valueChanges.pipe(
takeUntil(this.destroy$) takeUntil(this.destroy$)
).subscribe((value: ModbusSecurity) => { ).subscribe((value: ModbusSecurity) => {
this.onChange(this.disabled ? {} : value); this.onChange(value);
this.onTouched(); this.onTouched();
}); });
} }

Loading…
Cancel
Save