Somehow typeahead is caching results and if something changes in my database it won't search unless I use a totally different term. This results in confusing results and reloading the web page is needed to make things work again.
This option is not documented but it's working for me, when you initialise Bloodhound, remote can have cache: false. Like this:
var items = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: '/items/search?q=%QUERY',
wildcard: '%QUERY',
cache: false
}
});
i hope that helps
Thanks, now it works!
Most helpful comment
This option is not documented but it's working for me, when you initialise Bloodhound, remote can have cache: false. Like this:
i hope that helps