Bootstrap-3-Typeahead icon indicating copy to clipboard operation
Bootstrap-3-Typeahead copied to clipboard

Dropdown not being rendered

Open proevilz opened this issue 9 years ago • 2 comments

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?

proevilz avatar Feb 15 '17 00:02 proevilz

It appears this plugin doesn't work at all. I get nothing when I try it.

jsonjunky avatar Feb 19 '17 23:02 jsonjunky

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()
       });

bzarzuela avatar Jun 06 '17 04:06 bzarzuela