angular-ui / ui-select2

AngularJS wrapper for select2 (deprecated, use angular-ui/ui-select)
https://github.com/angular-ui/ui-select
MIT License
596 stars 443 forks source link

Fix updating view after programmatic changes #221

Open ravishivt opened 10 years ago

ravishivt commented 10 years ago

Use timeout to render view after programmatic changes to the model.

CharlesHamel commented 10 years ago

+1

Splaktar commented 10 years ago

This works, thank you!

Splaktar commented 10 years ago

This breaks two of the unit tests across all browsers: Firefox 33.0.0 (Windows 7) uiSelect2 with an element updated the view when model changes with complex object FAILED Expected [ { id : '0', text : '0' } ] to equal [ { id : '0', text : '0' }, { id : '1', text : '1' } ]. Firefox 33.0.0 (Windows 7) uiSelect2 with an element simple_tags Updating the model with a string will update the select2 view model. FAILED Expected [ ] to equal [ { id : 'tag1', text : 'tag1' } ].