Skip to content
Snippets Groups Projects
Commit b43145b2 authored by AUBRY JEAN-PASCAL's avatar AUBRY JEAN-PASCAL
Browse files

fix: implement update function when another macro rugo is selected

parent 027bec85
No related branches found
No related tags found
2 merge requests!252release: version 4.18.0,!213Resolve "Ajout du module courbe de remous d'une passe à macro-rugosité"
Pipeline #151602 passed
...@@ -16,6 +16,7 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar { ...@@ -16,6 +16,7 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar {
} }
if (pam !== undefined) { if (pam !== undefined) {
props.setPropValue("nubMacroRugo", pam.uid); props.setPropValue("nubMacroRugo", pam.uid);
} }
return super.initNub(props); return super.initNub(props);
} }
...@@ -40,6 +41,7 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar { ...@@ -40,6 +41,7 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar {
} }
protected reaffectResultComponents() { protected reaffectResultComponents() {
console.log("reaffect");
const mrr = this.currentNub as MacrorugoRemous; const mrr = this.currentNub as MacrorugoRemous;
mrr.syncSectionMacroRugo(); mrr.syncSectionMacroRugo();
...@@ -81,30 +83,28 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar { ...@@ -81,30 +83,28 @@ export class FormulaireMacrorugoRemous extends FormulaireFixedVar {
// interface Observer // interface Observer
// public update(sender: IObservable, data: any) { public update(sender: IObservable, data: any, props?: Props) {
// // copied from FormDefinition, to avoid calling super.update() that would trigger an unwanted this.refreshFieldsets(); // copied from FormDefinition, to avoid calling super.update() that would trigger an unwanted this.refreshFieldsets();
// if (sender instanceof Nub) { if (sender instanceof Nub) {
// switch (data.action) { switch (data.action) {
// case "resultUpdated": case "resultUpdated":
// // forward Nub results update notification to FormCompute objects // forward Nub results update notification to FormCompute objects
// this.reaffectResultComponents(); this.reaffectResultComponents();
// break; break;
// } }
// } }
// // copied from FormFixedVar, to avoid calling super.update() // copied from FormFixedVar, to avoid calling super.update()
// if (data.action === "propertyChange") { if (data.action === "propertyChange") {
// this.reset(); this.reset();
// } }
// if (sender instanceof SelectField) { if (sender instanceof SelectField) {
// this.reset(); // reset results this.reset(); // reset results
// console.log("update", data.action) if (sender.id === "select_target_pam" && data.action === "select") {
// if (sender.id === "select_target_pam" && data.action === "select") { this._currentNub.setPropValue("nubMacroRugo",data.value.value);
// // update Verificateur property: Pass to check }
// this._currentNub.setPropValue("nubToVerify", data.value ? data.value.value : undefined); }
// } }
// }
// }
public resetFormResults() { public resetFormResults() {
this._remousResults.reset(); this._remousResults.reset();
......
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