I am using Typeahead.js with the bloodhound suggestion engine and would like to make the list appear as soon as the user clicks in the search box.
I found this stackoverflow question (Twitter TypeAhead show all results programmatically) which is the same as me and the answer points to a jsfiddle solving the problem : http://jsfiddle.net/5xxYq/
Great.
However, it seems only to be working when not using bloodhound as the source for typeahead.
e.g. I forked their working example and switched the typeahead source to use bloodhound : http://jsfiddle.net/5xxYq/31/. The suggestion engine is working fine (when I type jo
the list appears), but the little hack to make the suggestions appear on click does not seem to be working anymore.
Any idea on how to make the suggestions list appear on click with bloodhound?
Thanks!
If you are using this solution in combination with bloudhound you will need to alter bloodhound.js or the bundle.js as well.
In typeahead.bundle.js or bloodhound.js add find this code (line 450)
Add this check to return all suggestions if the token input is empty:
It will now look like:
I have tested this in your fiddle and it works.