Browse Source
Merge pull request #9164 from ArtemDzhereleiko/AD/bug-fix/rule-node-disable-enable
Fixed set disabled state for rule node configuration
pull/9186/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
9 additions and
5 deletions
-
ui-ngx/src/app/modules/home/pages/rulechain/rule-node-config.component.ts
-
ui-ngx/src/app/shared/models/rule-node.models.ts
|
|
|
@ -225,7 +225,6 @@ export class RuleNodeConfigComponent implements ControlValueAccessor, OnInit, On |
|
|
|
this.definedConfigComponent.ruleChainId = this.ruleChainId; |
|
|
|
this.definedConfigComponent.ruleChainType = this.ruleChainType; |
|
|
|
this.definedConfigComponent.configuration = this.configuration; |
|
|
|
this.definedConfigComponent.disabled = this.disabled; |
|
|
|
this.changeSubscription = this.definedConfigComponent.configurationChanged.subscribe((configuration) => { |
|
|
|
this.updateModel(configuration); |
|
|
|
}); |
|
|
|
|
|
|
|
@ -101,12 +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}); |
|
|
|
if (this.disabledValue !== value) { |
|
|
|
this.disabledValue = value; |
|
|
|
if (value) { |
|
|
|
this.configForm().disable({emitEvent: false}); |
|
|
|
} else { |
|
|
|
this.configForm().enable({emitEvent: false}); |
|
|
|
this.updateValidators(false); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|