Questions tagged [bloodhound]

Bloodhound is the typeahead.js suggestion engine. It's robust, flexible, and offers advanced functionalities such as prefetching, intelligent caching, fast lookups, and backfilling with remote data.

Features

  • Works with hardcoded data
  • Prefetches data on initialization to reduce suggestion latency
  • Uses local storage intelligently to cut down on network requests
  • Backfills suggestions from a remote source
  • Rate-limits and caches network requests to remote sources to lighten the load

See the official documentation here.

280 questions
3
votes
1 answer

How do I submit data populated from typeahead bloodhound auto complete

How do I get typeahead to submit data. Here is the relevant code on jsfiddle http://jsfiddle.net/6W3Qu/2/. A copy of the code: var numbers = new Bloodhound({ datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.num);…
bluesman
  • 2,242
  • 2
  • 25
  • 35
3
votes
3 answers

Cannot update twitter typeahead.js prefetch thumbprint after initial load

I'm using typeahead (0.10.1) in an app to return a list of clients using bloodhound prefetch. I can't work out how to update/reinitialise bloodhound with a new thumbprint so that after the new client is inserted it will use a new thumbprint and…
MrTomTom
  • 337
  • 4
  • 12
3
votes
1 answer

Why does bloodhound.get() return undefined?

I'm trying to use the code below with typeahead.js v 0.10 // instantiate the bloodhound suggestion engine var numbers = new Bloodhound({ datumTokenizer: function(d) { return d; }, queryTokenizer: Bloodhound.tokenizers.whitespace, local: …
Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224
2
votes
0 answers

Is it possible to remove entry from Bloodhound index manually?

I'm using typeahead.js's Bloodhound for search. I download all the data once and store it locally, initializing search engine with local property equal to that data. Then, the entries from the data can be added or removed. Adding data works well,…
Olga Zhukova
  • 369
  • 1
  • 5
  • 13
2
votes
1 answer

How to use Bloodhound with a JSON created with flask jsonify

I am trying to use Bloodhound typeahead feature to be able to search a database on my flask application. I followed along here: Twiiter Typeahead Custom Templates - Getting Default Example Working $(document).ready(function(){ var playerList =…
2
votes
1 answer

Webpacker rails 6 (loading Bloodhound and typeahead)

I am trying to load Bloodhound and typeahead.query.js in webpacker of Ruby. I got Bloodhound working in the environment.rb file and I got rid of that error. But typeahead is still not working getting this error thrown. Uncaught TypeError:…
soniccool
  • 5,790
  • 22
  • 60
  • 98
2
votes
1 answer

typeahead - minLength to trigger the suggestion list

I set minLength to 3 to trigger the suggestion list when at least 3 characters have been typed in. But the dropdown opens when 1 character is typed in. How to make this work? $('#remote .typeahead').typeahead(null, { name: 'best-pictures', …
smolo
  • 737
  • 1
  • 15
  • 27
2
votes
0 answers

ReferenceError: Bloodhound is not defined

I am trying to use Twitter's Typehead with Bloodhound, via NPM, and am getting the above error. I have seen other questions (and fixes) which are similar, but don't involve NPM. I am using Laravel 5.5 and Webpack. First, I installed typeahead.js…
DatsunBing
  • 8,684
  • 17
  • 87
  • 172
2
votes
1 answer

How to use multiple datasets in one go with Typeahead and Bloodhound?

I'm trying to use Typeahead/Bloodhound for suggestions and search. For simplicity's sake, let's assume I have two types of model objects - Country and City. public class Country { public string Name { get; set; } } (Server-side is in ASP.NET,…
nikovn
  • 1,900
  • 5
  • 22
  • 28
2
votes
1 answer

How to disable Bloodhound's ajax 'global' flag (Typeahead.js)

I've seen people configure the AJAX request Bloodhound is performing in typeahead.js by including an ajax object like this on their constructor: var locsData = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace("name"), …
JorgeGRC
  • 1,032
  • 2
  • 18
  • 37
2
votes
0 answers

Trigger twitter typeahead when another field is completed

I have two fields. One is bound with typeahead. But I want to trigger request, only when another field is not empty (to pass that value as well). How can I do that? I use Bloodhound as well. Thanks in advance. My code…
Paul R
  • 2,631
  • 3
  • 38
  • 72
2
votes
0 answers

Angular2 Webpack can't find name "Bloodhound"

I'm using Bootstrap Tags Input as a component for my Angular 2 project. I can use jQuery directly after did import but Bloodhound can't. The Typescript compiler said: "Cannot find name 'Bloodhound' " I have loaded required libraries from…
Davuz
  • 5,040
  • 13
  • 41
  • 61
2
votes
0 answers

typeahead.js does not show results for array of JSON objects

I'm using typeahead.js with Bloodhound to remote search through our products, but even though I do get a valid json response the empty template keeps being shown. products = new Bloodhound( datumTokenizer: Bloodhound.tokenizers.whitespace …
joost
  • 173
  • 2
  • 10
2
votes
1 answer

Typeahead - Bloodhound initialize() failed

After HTML5 migration of a legacy JSP page, Bloodhound.initialize() method does not get triggered when the page load. This was working before the html5 migration. I am new to typeahead.js and any help would be really appreciated. typeahead.js…
Lahiru Ruhunage
  • 351
  • 2
  • 10
  • 23
2
votes
0 answers

Twitter typeaheads autocomplete fails with dots (.), dashes (-) and ampersands (&) in

We're using the twitter typeaheads and it auto completes the value, until you type a dot, slash or &. Then the auto complete does not show any values. So if I type South, it will show South&Dakota and South&Carolina, but when I type the '&' it does…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77