-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Problem populating #599
Comments
+1 are you supposed to be able to be able to populate the model from outside of the directive? |
possibly related to this #256 |
Hi don't think its the same issue. I have no problem tracing the property I want from the object. The problem is with populating. |
I have the same problem. I use the field to select a fresh value, and then I have an edit page which I can provide with: The entire selected object - problematic because when you select a value using the control itself, it only populates the id. The id alone - problematic because you can't see the human readable detail of the selected item, you just see a blank box. Whichever way you look at it, it fundamentally doesn't work, and requires manual massaging of the values to get it to work - and even then you need to run any automatically triggered (on-select) methods manually. My controller is now a total mess, and it still doesn't work because pre-populating the ajax-fetched data from the model stops it refreshing when the dropdown is clicked. I've spent a day on it, and I'm now looking to replace the component because it doesn't seem to be able to do something quite fundamental - i.e. allow editing of previous data - which is a real showstopper. What I think is needed is a method of triggering a 'select' using data from ajax calls to re-populate the controls as if done by a user. But I can't see a way to do this. |
This actually used to work for me in 0.9.7 and prior--setting the model value directly. Oddly, if i set it twice, it sometimes works. It's like a watch is not firing correctly. |
~~I forked @eastdacc 's plunker and updated the select.js version to 0.9.9 and changed the model value to a string array instead of the entire object, with a corresponding 'person.name as person in people' change in ui-select-choices repeat. It should hopefully highlight a very similar issue to @eastdacc 's. |
I got the same problem. It works perfect when I the array is populated, but not when it is empty. |
Hello
I have created this plunk to show the issue I am having.
Not sure if is a bug or if I am missing something.
http://plnkr.co/edit/oXbqsIKKXjBqxCqsKifk?p=preview
thank you
The text was updated successfully, but these errors were encountered: