UI: add condition to setter disabled
This commit is contained in:
parent
bdc7525ac4
commit
f3c7a053ea
@ -101,14 +101,18 @@ export abstract class RuleNodeConfigurationComponent extends PageComponent imple
|
|||||||
configurationValue: RuleNodeConfiguration;
|
configurationValue: RuleNodeConfiguration;
|
||||||
|
|
||||||
private configurationSet = false;
|
private configurationSet = false;
|
||||||
|
private disabledValue = false;
|
||||||
|
|
||||||
set disabled(value: boolean) {
|
set disabled(value: boolean) {
|
||||||
|
if (this.disabledValue !== value) {
|
||||||
|
this.disabledValue = value;
|
||||||
if (value) {
|
if (value) {
|
||||||
this.configForm().disable({emitEvent: false});
|
this.configForm().disable({emitEvent: false});
|
||||||
} else {
|
} else {
|
||||||
this.configForm().enable({emitEvent: false});
|
this.configForm().enable({emitEvent: false});
|
||||||
this.updateValidators(false);
|
this.updateValidators(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
set configuration(value: RuleNodeConfiguration) {
|
set configuration(value: RuleNodeConfiguration) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user