-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ng-model not updating with 1.3rc3 #243
Comments
I have the same problem. Using ng-model="$parent.model" doesn't help either. |
what has the $item variable? |
I am not sure, I was guessing something in ui-select-match. I was following this example: http://plnkr.co/edit/juqoNOt1z1Gb349XabQ2?p=preview (Array of objects with single property binding) |
The example and my code did work with 1.2.25 |
More/better information.. vm is a "Controller as vm" syntax, the vm.model.roles is an array of int
|
$select.ngModel.$modelValue doesn't get updated (it gets updated in the example here though: http://plnkr.co/edit/juqoNOt1z1Gb349XabQ2?p=preview) |
For me it only happens with the "multiple", not with single-select lists. |
getting rid of extra $formatters from ngModel provided a quick dirty fix to our specific usecase. |
I couldn't really make anything work there, but inserting a "scope.mymodel.myvalue = newValue" in https://github.com/angular-ui/ui-select/blob/master/src/select.js#L735 fixes it for me, although that isn't really a feasible solution. |
I changed
to
|
Much better, and works here as well! |
Related to merged #193 |
Tested with 1.3 rc4, works, thank you. |
I had the same problem. Tested with 1.3 rc5 and works as well. |
From a duplicate/related issue (#205): Saw this issue in production after upgrading to angular 1.3.4, Everything multiple looks okay, but model never updates. Here is a plunker: http://plnkr.co/edit/VdC2ImYaQQJQPw1jsDUV?p=preview |
I'm having same issue @tannerlinsley stated, with multiple and on Angular 1.3.4.
yet if it works it gives an error with filter. Any non-breaking fix would be appreciated. |
Same issue...cannot get selected model with Angular 1.3.4 Unfortunately using native |
Any word on this? 👍 💯 |
I'm experiencing this same issue with Angular 1.3.2 and ui-select |
After #748 merged, can you check if all good now? |
Not working for me (tried with multiselect) |
Hi guys, I went throught angular docs about ngModelCtr.$setViewValue saying:
So I found the code where the model is updated when an item is selected in the dropdown and changed it: from
to
This seems to work for me. Hope it helps you. |
Still having this issue with multiple selects - but getting rid of $formatters as per @zavidovych worked here too. |
Still facing this issue with multiple selects - have used with angular 1.4.7. Strange thing to me is only the first time the options of my ui-select wasn't set up(only showed up a blank input box) while model been updated; after that, its options DO update as model changes. |
Can someone post a Plunker based on an up to date version of UI Select? |
Using angular 1.3 rc3, my ng-model is never updated.
Code...
When the call to ngModel.$setViewValue is made, the ngModel.$viewValue is already the newValue (as well as ngModel.$$lastCommittedViewValue).
Tracing through$setViewValue to $ $debounceViewValueCommit, then to $commitViewValue, it returns without parsing and validating if $ $lastCommittedViewValue === viewValue.
Not sure why the ngModel already has the newValue. I see your note about the 3rd parameter forcing revalidate, but that is not there in 1.3 rc3. Maybe a call to ngModel.$$validate?
Side question - what is the preferred method of validating contents like other input elements?
The text was updated successfully, but these errors were encountered: