Skip to content
This repository has been archived by the owner on May 5, 2018. It is now read-only.

select2 doesn't update the view when dynamically changing ng-model values #483

Closed
vlamic opened this issue Mar 12, 2013 · 3 comments
Closed

Comments

@vlamic
Copy link

vlamic commented Mar 12, 2013

After page has been loaded, the bound value is displayed correctly, but if ng-model was changed, the view gets broken.

With select2 version 3.3.1: http://plnkr.co/edit/vTFqP9pSn9QgJUkPuzRx?p=preview
You can see that after page has been loaded, the selected values are displayed. If you click "Change tags" or "Change tags2" the view gets broken.

With select version 3.2: http://plnkr.co/edit/NITfYJ1tPYatJFmK4UQJ?p=preview the view get bound to correct number of items if you click "Change tags" or "Change tags2", but the values displayed are still broken.

@vlamic
Copy link
Author

vlamic commented Mar 12, 2013

I guess it could work if you keep specific for select2 data format {id: "someId", text: "sometext" }, but then we loose benefits of data binding. It would be at least nice to have ability set some proxy functions to set data to and from select2 and keep bound object to ng-model the same structure as it was before.

@ProLoser
Copy link
Member

ProLoser commented May 3, 2013

AngularUI is currently undergoing a restructure. This project will no longer hold the codebase, can you please relocate this to https://github.com/angular-ui/ui-select2 (after confirming it's still necessary with the latest code)?

@nateabele
Copy link

This repo is discontinued. The project has been relocated here: https://github.com/angular-ui/ui-select2

Please reopen this issue there if it is still relevant.

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