Browse Source

UI: add condition to setter disabled

pull/9164/head
Artem Dzhereleiko 3 years ago
parent
commit
f3c7a053ea
  1. 14
      ui-ngx/src/app/shared/models/rule-node.models.ts

14
ui-ngx/src/app/shared/models/rule-node.models.ts

@ -101,13 +101,17 @@ export abstract class RuleNodeConfigurationComponent extends PageComponent imple
configurationValue: RuleNodeConfiguration;
private configurationSet = false;
private disabledValue = false;
set disabled(value: boolean) {
if (value) {
this.configForm().disable({emitEvent: false});
} else {
this.configForm().enable({emitEvent: false});
this.updateValidators(false);
if (this.disabledValue !== value) {
this.disabledValue = value;
if (value) {
this.configForm().disable({emitEvent: false});
} else {
this.configForm().enable({emitEvent: false});
this.updateValidators(false);
}
}
};

Loading…
Cancel
Save