Code: Select all
<p-dropdown [options]="predictionModels" [(value)]="selectedPredictionModel" (onChange)="recalculatePredictions()"></p-dropdown>
Then the binding is correctly set by Angular after my function recalculatePredictions() returns.
If I click again, I see that is again the old value 'B' now, etc ...
Do I do it bad ? Is a solution passing arguments directly to get the new value on my controller ?
--------- DOCUMENTATION
Name
onChange
Parameters
event.originalEvent: Browser event
event.value: Single value or an array of values that are selected
Description
Callback to invoke when value of dropdown changes.
------------------
ALSO : After binding, this.selectedPredictionModel is equal to 'value' field of SelectItem and not the SelectItem himself. Is is normal ?