I'm using Typeahead.js v0.10.4 with Bloodhound remote option. It works as I expected for a while, but hitting a lot of backspace and typing again just stop all functionality. I made a tiny test for this:
var bhOptions = {
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: '%QUERY',
transport: function(url, o, onSuccess, onError) {
$('#console').prepend(url + "\n");
}
}
};
var saSearch = new Bloodhound( bhOptions );
saSearch.initialize();
$('#search').typeahead({}, {
source: saSearch.ttAdapter()
});
http://jsfiddle.net/SubZtep/Lkh68/
Any idea what I am doing wrong? I've tried to play with rate limit but it didn't help.
Just for the record I found a similar issue but it didn't solve my problem: https://github.com/twitter/typeahead.js/issues/149