Dropdown not being rendered
I used the twitter version of this but that screwed with the styles so I switched to this one. I've tried to set this up Bloodhound. There are no errors and results are being returned from the request successfully as seen in chrome dev tools on the network tab, but the drop down isn't being rendered into the DOM.
http://stackoverflow.com/questions/42238340/bootstrap-typeahead-not-showing-results
This is my code
<input type="text" id="search" data-provide="typeahead" autocomplete="off">
var engine = new Bloodhound({
remote: {
url: '/find?q=%QUERY%',
wildcard: '%QUERY%'
},
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace
});
engine.initialize();
$("#search").typeahead({
hint: true,
highlight: true,
minLength: 0,
source:engine.ttAdapter()
});
Anyone else had the same problem?
It appears this plugin doesn't work at all. I get nothing when I try it.
I have the same issue with no indication of any errors in the Console or Network tab. The result returned is an array of objects with a name property.
var choices = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.whitespace,
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: '/playground/search?q=%Q',
wildcard: '%Q'
}
});
choices.initialize();
$(".typeahead").typeahead({
source: choices.ttAdapter()
});