angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

Typeahead: Selecting object instead of string

Open k-funk opened this issue 12 years ago • 4 comments

http://plnkr.co/edit/Auv8lrRt6buVD5SBqXrr?p=preview

Observe console errors when selecting an option.

Same error as in this issue: https://github.com/mgcrea/angular-strap/issues/762

Need to be able to assign a non-string to the model. If you double click on a result, it seems to load the object into the model, but with errors, and ...having to double click :P

k-funk avatar May 22 '14 23:05 k-funk

You can avoid this error by providing a label property with the string you want to see in the input. This works for 2.0.2, your plunkr was using 2.0.0 (seems like it's not updated in the /dist that was there).

Here's it in action: http://plnkr.co/edit/bRRYgn874KwlnFIqZeor?p=preview

austingreco avatar May 24 '14 05:05 austingreco

Great. Thanks!

k-funk avatar Jun 11 '14 21:06 k-funk

Do the docs currently mention the label property anywhere? If not, I think they should.

zkirill avatar Jul 09 '14 19:07 zkirill

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 26 '19 20:01 lock[bot]