Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

null values in ng-model after changing ng-model programmatically on multiselect #739

Closed
KKrisu opened this issue Mar 10, 2015 · 9 comments · Fixed by #748
Closed

null values in ng-model after changing ng-model programmatically on multiselect #739

KKrisu opened this issue Mar 10, 2015 · 9 comments · Fixed by #748
Milestone

Comments

@KKrisu
Copy link

KKrisu commented Mar 10, 2015

version 0.11.1

Demo http://plnkr.co/edit/kLsFtY?p=preview

settings multiselect, complex ui-select-choices objects

Issue
When ng-model is empty and I'm programmatically changing ng-model values, it changes ng-model to null. When ng-model is not empty and I'm changing values programmatically it works fine. That's why when you click on the button on my demo second time (or you choose any value manually using UI), the values are set correctly.

FIX
PR: #740

@renanlecaro
Copy link

I got into some trouble when modifying the model outside of ui-select too
http://plnkr.co/edit/Wboo1fiePaLHKX0eHjxI?p=preview
It looks like it's more of a one way binding than a 2 ways : adding / removing elements with ui-select works well, but the digest cycle of the directive is not always triggered.

@dimirc dimirc added this to the 0.11.x milestone Mar 11, 2015
@titoaesj
Copy link

I have the same proble than Kris Kesy

@nascosto
Copy link

+1 We are having the same problem. Spent quite a bit of time tracking this down.

@clydetacoma
Copy link

+1

3 similar comments
@lianyi
Copy link

lianyi commented Mar 13, 2015

+1

@JasonTypesCodes
Copy link

+1

@olso
Copy link

olso commented Mar 16, 2015

+1

@lisaq-leafnode
Copy link

We are also having the same issue. When is this pull request likely to be merged in?

lisaq-leafnode added a commit to IntegratedBreedingPlatform/Workbench that referenced this issue Mar 16, 2015
… variable details edit screen.

There is a bug with multi-select being changed programmatically in the ui-select code so a fork of the code base that fixes the issue has been used temporarily.
See angular-ui/ui-select#739 and KKrisu/ui-select@ec5c1e9

Issue: BMS-287
Reviewer: Helen
@dimirc
Copy link
Contributor

dimirc commented Mar 17, 2015

Should be fixed with #748

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