AngularUI-Bootstrap Typeahead: Grouping results

I used to have a similar requirement and here is how I did it that time. Example Plunker: http://plnkr.co/edit/zujdouvB4bz7tFX8HaNu?p=preview The trick is to set the typeahead-template-url to a custom item template: <input type=”text” class=”form-control” placeholder=”Users loaded from local database” ng-model=”selectedUser” typeahead=”user as user.name for user in getUsers($viewValue)” typeahead-template-url=”typeahead-item.html” /> The item template, this represent each … Read more

How to trigger an event in input text after I stop typing/writing?

You’ll have to use a setTimeout (like you are) but also store the reference so you can keep resetting the limit. Something like: // // $(‘#element’).donetyping(callback[, timeout=1000]) // Fires callback when a user has finished typing. This is determined by the time elapsed // since the last keystroke and timeout parameter or the blur event–whichever … Read more

Twitter bootstrap typeahead multiple values?

Edit There already was a pull about that : https://github.com/twitter/bootstrap/pull/2007 You can approach the desired behavior by using a proxy for the typeahead : Demo (jsfiddle) var $myTextarea = $(‘#myTextarea’); $(‘.typeahead’).typeahead({ source: source, updater: function(item) { $myTextarea.append(item, ‘ ‘); return ”; } }); I think the updater method is meant for this kind of thing, … Read more

How do we set remote in Typeahead.js?

Typeahead.js version 0.10.0 now uses a separate component called a suggestion engine for providing the suggestion data. The suggestion engine which ships with Typeahead.js is called Bloodhound. Hence you cannot “define remote without having to define a dataset function”. An example of this working with a remote data source (I’m querying the TheMovieDb API, try … Read more