We just upgraded Angular from 1.2 RC 2 to 1.2 final and upgraded select2.js from 3.4.0 to 3.4.3.1. Now I'm noticing some dropdowns not displaying their values correctly.

The dropdown value is actually set and if you open the dropdown you see it highlighted. If the backing model value is set initially it displays correctly. If set later on, say after an HTTP call returns or a timeout, the dropdown doesn't render the value set, even with $scope.apply.

I did notice that Angular UI itself (including UI-select) didn't have any updates after Angular 1.2 dropped which seems odd.

Working Plunker:
http://plnkr.co/edit/unQGrqUr7IJinDEioERf?p=preview

Note in app.js of the plunker, after a brief timeout, the degree type id value gets set to 2 which maps to "Associates". The dropdown still shows the placeholder text instead of that value, but opening the dropdown does have Associates selected.

This functionality worked prior to the upgrade. I'm not seeing anything jump out about breaking changes in this regard so I'm assuming this is something that needs to be addressed in UI-select? Or perhaps we were doing something wrong that we just got away with before?

share|improve this question
    
Best I can tell this isn't officially supported yet via github.com/angular-ui/ui-select2/issues/91 – Geoffrey Hudik Nov 14 '13 at 17:32

This one line workaround in Angular UI worked for now until this is officially supported: https://github.com/mchapman/ui-select2/commit/d6544d9d6b3098e8bfd31f06de79176ac90d2fe5

share|improve this answer

This is fixed in the latest version on the github repo. A while ago, the main angular-ui repo was discontinued and split into smaller repos, one per component. This is why you haven't seen any changes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.