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

$select.selected is not updated when a new value pushed to ng-model #560

Closed
mkeremguc opened this issue Jan 3, 2015 · 6 comments
Closed

Comments

@mkeremguc
Copy link

long story short, i have some async calls to api to get the ng-model initialized/updated accordingly. However, it doesn't update view of a multiple select right after..
i "sometimes" get some throw: "Error: [ui.select:multiarr] Expected model value to be array but got '5'"
altho it shouldn't be the case since the ng-model doesn't get updated from user input at that time but i suspect some race conditions between ngmodel->view and view->ngmodel

here is a simple plunker forked from the example:
http://plnkr.co/edit/mhQW9aCjoAir1DzVMPUk?p=preview
just a timeout push to multipleDemo.colors, there you see the ngmodel gets updated but select input is not..
no problem for non-multiple selects..

@tjdavenport
Copy link

I'm also having this issue

@Flightfreak
Copy link

Is it not related to this issue? #404 Fix might be soon available. #256

@MikeABentley
Copy link

I have this issue as well

@jukkasi
Copy link

jukkasi commented Jan 31, 2015

Probably something I'm seeing too, commented in #256

PR fix does not affect plnkr example since no tracked by is used, though I think this is something that should work out of the box

@mkeremguc
Copy link
Author

this seems fixed. however, if you want to push to match externally, you need to push to your choices first

@wesleycho
Copy link
Contributor

Closing as fixed as per comments - feel free to open a new issue with appropriate reproduction if this is still an issue.

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

6 participants