Skip to content
Snippets Groups Projects
Commit 91b62e81 authored by François Grand's avatar François Grand
Browse files

fix: calculate enabled button of a calculator depends on other calculator validity status

refs #544
parent 10bb546b
No related branches found
No related tags found
1 merge request!144Resolve "PréBarrages: les changements de couleur du schéma ne sont pas instantanées"
Pipeline #139571 passed
......@@ -266,10 +266,10 @@ export class FieldSetComponent implements DoCheck {
return (paramsAreValid && selectAreValid);
}
private updateValidity() {
private updateValidity(forceEmit: boolean = false) {
// global validity
this._isValid.value = this.computeValidity();
if (this._isValid.changed) {
if (forceEmit || this._isValid.changed) {
this.validChange.emit();
}
}
......@@ -282,7 +282,7 @@ export class FieldSetComponent implements DoCheck {
}
public ngDoCheck() {
this.updateValidity();
this.updateValidity(true);
}
/**
......
......@@ -108,7 +108,7 @@ export class FieldsetContainerComponent implements DoCheck, AfterViewInit {
}
public ngDoCheck() {
this.updateValidity();
this.updateValidity(true);
}
/**
......@@ -142,10 +142,10 @@ export class FieldsetContainerComponent implements DoCheck, AfterViewInit {
return res;
}
private updateValidity() {
private updateValidity(forceEmit: boolean = false) {
// global validity
this._isValid.value = this.computeValidity();
if (this._isValid.changed) {
if (forceEmit || this._isValid.changed) {
this.validChange.emit();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment