Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

select2 doesn't get initialized correctly when using nested ng-repeat with optgroup #8

Closed
tadchristiansen opened this issue May 5, 2013 · 3 comments

Comments

@tadchristiansen
Copy link

I posted the following issue stackoverflow (contains a jsfiddle that shows the issue):

http://stackoverflow.com/questions/16123704/how-to-get-select2-tags-initializing-correctly-with-angular-ui-when-option-group

I have tried digging in to angular-ui to see if I can find what keeps it from getting initialized but the code looks correct:

if (isSelect) {
elm.select2('val', controller.$modelValue);
}

controller.$modelValue is set correctly so it seems like its some kind of refresh issue.

http://jsfiddle.net/tadchristiansen/QRRYf/

@DiegoPires
Copy link

Have you tried to update your angularui? After they have separated in more files and modules they have also changed some things...

This part you pointed changed to use the $viewValue now, and in the inicialization of the select2 there`s a couple more of validations too

https://github.com/angular-ui/ui-select2/blob/master/src/select2.js

@tadchristiansen
Copy link
Author

I tried this tonight. Looks like it is now working. Thanks!

@ProLoser
Copy link
Member

I love it when a plan comes together

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants