typeahead.js
typeahead.js copied to clipboard
Results hidden for small datasets
I've found that some of my results are being hidden, sometimes all of them. Changing
function async(suggestions) {
suggestions = suggestions || [];
if (!canceled && rendered < that.limit) {
that.cancel = $.noop;
rendered += suggestions.length;
that._append(query, suggestions.slice(0, that.limit - rendered));
that.async && that.trigger("asyncReceived", query);
}
}
to
function async(suggestions) {
suggestions = suggestions || [];
if (!canceled && rendered < that.limit) {
that.cancel = $.noop;
that._append(query, suggestions.slice(0, that.limit - rendered));
rendered += suggestions.length;
that.async && that.trigger("asyncReceived", query);
}
}
has fixed it for me, is this a bug?
More discussion at #1415
Duplicate of #1232