Label doesn't update on Select widget item change.
Hello.
I have a Select widget that is populated locally, through an array declared in Home.js. An oversimplification of my problem: Whenever a new item is selected from the Select widget, I want a label to be updated with another value, being passed through an Application Parameter. I sort of managed this behaviour, but there's something wrong. When I select another item from the list, the label stays the same. When I select another item from the list, the label changes to the value that should've appeared in the previous case. Every time I select something from the Select widget, the label updates with the value that should've appeared the step before.
Can anyone tell me what am I missing? For reference, this is the array that populates the dropdown:
$scope.view.wdg["select-1"]["list"] = [
{
display: "UC2",
value: "1"
}
,
{
display: "UC3",
value: "2"
}
,
{
display: "UC4",
value: "3"
}
];
My Application Parameter is called maxSteps, and I populate it through
$scope.app.params["maxSteps"] = 10; //or any other value
I have a function that I set on the Select widget, on the Value Changed attribute, called onSelectChanged(), that tries to change the Application Parameter maxSteps. After the change is made, a label widget is changed with the value taken by the maxSteps property (where I think I'm mistaken).
This label change is done through a scope watch on the maxSteps variable, but it doesn't seem to work.
Does anyone have any suggestions how should I proceed? Thank you very much!

