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
2
votes
2 answers

Twitter typeahead bloodhound tokens not working

the tokens are not working, when I type 'east', 'home' or 'trap' it should suggest 'Inkoopverenigingen', what's wrong? json: [ { "value": "Inkoopverenigingen", "tokens": [ "inkoopverenigingen", "inwoopverenigingen", …
Ruben
  • 8,956
  • 14
  • 63
  • 102
2
votes
1 answer

How to sort by closest string with typeahead?

I'm having some issues on how I control the way Bloodhound and Twitter Typeahead sorts the results that are displayed in the typeahead. I'm using the typeahead to display suggested addresses and cities, meaning that someone could either search for…
Marcus Lind
  • 10,374
  • 7
  • 58
  • 112
2
votes
1 answer

Map typeahead suggestions after they are fetched

I am using the last twitter typeahead. var suggestions = new Bloodhound({ datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.value); }, queryTokenizer: Bloodhound.tokenizers.whitespace, remote:…
Euphe
  • 3,531
  • 6
  • 39
  • 69
1
vote
1 answer

`display` option in typeahead.js does not work

I have been at this for hours, and I am sure I am making a dumb mistake. But I am at a loss... Here is what I have…
1
vote
0 answers

Typeahead Bloodhound Do Something While Prefetch Is Happening

Bloodhound's prefetch feature is working great for me, but I would like to disable my inputs while the prefetch is happening. Does anyone know of a way to detect when the prefetch is happening, do something, and then do something else when the…
1
vote
1 answer

Supplying remote JSON data for Typeahead / Bloodhound with Django / Python

I'm trying to replicate functionality of this Typeahead remote example, but I can't figure out how to supply the data in the way Typeahead / Bloodhound wants it, nor what datumTokenizer or queryTokenizer are for. In Python / Django views.py I've…
1
vote
0 answers

Core JS Typeahead Bloodhound - results available read to screen reader

Wondering if anyone has this experience with typeahead.js and bloodhound (from this repo). When I get bloodhound suggestions from an AJAX request, the total number of results available are read to the screen reader (NVDA). When I get them from just…
1
vote
2 answers

Bloodhound matching not working with special characters

I am using typeahead.js with Bloodhound to search users using a local source: let users = [ {name: 'John Doe (john.doe@email.org)', value: '3421'}, {name: 'Jane Doe (test@email.org)', value: '8100'}, ]; The matching and display key is…
dabadaba
  • 9,064
  • 21
  • 85
  • 155
1
vote
1 answer

Twitter Typeahead Bloodhound: Get current search string inside sorter option

I'm trying to sort the suggestions depending on the position of the search string inside the data-fields. If someone types 'ar' the suggestion A:'how are you' should be ordered before B:'come as you are' because the search string matches at the 2nd…
Bernd M.
  • 13
  • 5
1
vote
0 answers

Having to click twice on an autocomplete suggestion to populate on to the text field

I'm able to populate all the required suggestions using typeahead.js The problem is that i'm having to double click the autocomplete suggestion for it to populate into the text field. I can't seem to figure out why this isn't working on a single…
Yehudah
  • 65
  • 1
  • 5
1
vote
1 answer

Bootstrap Tags input with Objects as tags typehead Free input not working

I am using bootstrap-tags input (Objects as tags - https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/) for my tags input. It is working fine with Objects as tags for auto complete suggestions. But I am trying to active Free input…
1
vote
1 answer

How to set unique minLength for each datumtokenizer in typeahead dataset

Background: I am using typeahead.js to surface search suggestions to users. I want users want to be able to see suggestions based off both the "title" & "diff" of my dataset. The issue I'm having is that when the title & diff fields overlap, it can…
12th
  • 191
  • 3
  • 12
1
vote
1 answer

Typeahead, Bloodhound & Selecting Data Source Issue

I have a script as such: