Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Typeahead with Pre-populated model revisited #462

Closed
michalgm opened this issue May 23, 2013 · 1 comment
Closed

Typeahead with Pre-populated model revisited #462

michalgm opened this issue May 23, 2013 · 1 comment

Comments

@michalgm
Copy link

I'm trying to get the typeahead working so that it shows the display label on initialization instead of the value. I found this issue report, #203, which has been resolved.
Indeed, if you use a full object as the value being stored to the model, then the proper label will be displayed when it initializes. However, if you are only storing a single property of the object, you can only display that value.
I've modified the plunker from the previous issue request.
http://plnkr.co/edit/U8dJGf?p=preview

Mind you, I'm like 24 hours new to angular.js, so I may be missing something. However, it seems to me that if you can expect to label->value mapping to function properly when using the typeahead, that the control should initialize with that mapping as well.

@pkozlowski-opensource
Copy link
Member

@michalgm This is duplicate of #274

Essentially the problem is with results retrieved asynchronously (ex. from a back-end) where we simply might not have enough info to render a label properly, see the discussion in #274 for more details.

codedogfish pushed a commit to codedogfish/angular-ui-bootstrap that referenced this issue Sep 15, 2015
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

2 participants