I think you will have to reload the drop down anew by calling Init again.

On Tuesday, August 15, 2017 at 10:54:47 AM UTC-7, Barnaby Farnsworth wrote:
>
> I am attempting to troubleshoot why my select option value in my web app 
> won't change after I load new data. 
>
> This is currently the select code in my web app:
>
> <select ng-model="mySelect" ng-change="showSelectValue(mySelect)" 
> ng-options="item.value as item.title for item in selectOptions" 
> no-dirty-check="">  </select>
>
> My controller processes the options with this code:
>
> $scope.init = function() {
>   $scope.selectOptions = [
>   {value: "EndTimeSoonest", title: "Ending Soonest"},
>   {value: "StartTimeNewest", title: "Recently Added"},
>   {value: "PricePlusShippingHighest", title: "Highest Priced"},
>   {value: "PricePlusShippingLowest", title: "Lowest Priced"},
>   {value: "Completed", title: "Completed - Most Recent"},
>   {value: "CurrentPriceHighest", title: "Completed - Highest Price"}
>   ];
> };
>  
> $scope.init();
>
> I am loading a series of data based of the user selecting items from the 
> drop down menu. However, if they go to load a new search or new data, the 
> last selected item in the select remains chosen, but the correct values are 
> being passed.
>
> You can see the proof of concept here: http://dev.sortsof.com 
>
> Any ideas on how I can get the select to reset after a new search or 
> loading new data?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to