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

fix: linked parameter incorrectly reset to fixed on form creation

refs #571
parent 3b982a50
No related branches found
No related tags found
1 merge request!177Resolve "Un paramètre lié ne change pas d'état après la suppression du module cible"
Pipeline #139930 passed
......@@ -259,9 +259,11 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy {
}
public updateParamList() {
let noMoreTarget = false;
// liste des paramètres liables
if (this.param.valueMode === ParamValueMode.LINK) {
this._linkableParams = this.formService.getLinkableValues(this.param);
noMoreTarget = this._linkableParams.length === 0;
} else {
this._linkableParams = [];
}
......@@ -286,8 +288,10 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy {
}
} else {
this._currentIndex = -1;
// back to SINGLE mode by default
this.param.valueMode = ParamValueMode.SINGLE;
// back to SINGLE mode by default if no more target module available
if (noMoreTarget) {
this.param.valueMode = ParamValueMode.SINGLE;
}
}
}
......
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