-
Notifications
You must be signed in to change notification settings - Fork 1.8k
sortable="true" does not update the ng-model #974
Comments
Looks like it needs a You could trigger this using the event
|
Thanks @homerjam for responding. Unfortunately, I'm too new to both Angular and ui-select to know exactly what you mean though at a high-level it is as though you want to copy/assign
|
The model is updated, but the view isn't. The view is updated on a digest cycle. The digest cycle is what needs to be triggered in ui-select (but currently isn't). You can workaround this with my suggested fix - which might be better than trying to guess at a fix to a lib/framework you don't know very well yet. |
@homerjam : Thanks for your guidance. I'll do my best to apply what you've offered thus far. Updated Plunker with @homerjam's edits http://plnkr.co/edit/Oxk6DnZbCdM0cZHXAg8i?p=info and sadly the below doesn't work :(. Yes, selecting a new item after re-ordering does cause ng-model to reflect the "new selected order" as well as the new item. The issue is that after a drag n' drop of options selected (re-ordering), the selected items (
|
Quick fix:
|
@homerjam : Bingo! That worked. (bow) |
@homerjam fix works. +1 |
Originally from homerjam@637be08
For those, who are looking for a bower-solution until this fix will be merged, you can set this in your
|
Originally from homerjam@637be08
Originally from: homerjam@637be08
Reference: #209
After drag n' drop of options selected (re-ordering), the selected items (
<ui-selelct ... ng-model="mycontrollerscopeattr".. >
) is not updated.Try it out here: http://plnkr.co/edit/eiwaOrkK4V9ZGwfGE5IV?p=preview
If this is not a bug (and developer error) then, can you make the example work? I'll gladly update any documentation.
The text was updated successfully, but these errors were encountered: