Typeahead.js: Issues with Bloodhound + %QUERY

Created on 7 May 2015  路  8Comments  路  Source: twitter/typeahead.js

Previous versions of Bloodhound used to let me do the following:

var bloodhound = new Bloodhound({
remote: '/search/?term=%QUERY'
});

However %QUERY now doesn't seem to work - whats the new method of doing this? I've trawled the docs to no avail...

Most helpful comment

I changed

remote: '/location_typeahead/%QUERY'

to

remote:
url: '/location_typeahead/%QUERY'
wildcard: '%QUERY'

All is good...

All 8 comments

var bloodhound = new Bloodhound({
remote: {
url: '/search/?term=%QUERY',
wildcard: '%QUERY'
}
});

This doesn't seem to work for me, yet if i edit typeahead.js directly, and change line 712 from

wildcard: null,

to

wildcard: '%QUERY',

then it does work. Is this a possible bug?

can you post your full initialization code?

I ran into this problem too and the solution you recommended worked for me. I have a pull request clarifying this documentation and I'd also like to know why the solution didn't work here.

I changed

remote: '/location_typeahead/%QUERY'

to

remote:
url: '/location_typeahead/%QUERY'
wildcard: '%QUERY'

All is good...

@atstockland Thanks, that works!

thanx it works

yes! Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gyanxie picture Gyanxie  路  5Comments

DevChive picture DevChive  路  5Comments

digitalpenguin picture digitalpenguin  路  4Comments

agborkowski picture agborkowski  路  5Comments

Neeeeena picture Neeeeena  路  3Comments