typeahead.js
typeahead.js copied to clipboard
Updating Bloodhound local does not update typeahead's default suggestions
I'm updating my bloodhound instance like so:
tagsBloodhound.local = newList;
tagsBloodhound.initialize(true);
Still, my corresponding typeahead's default suggestion list (minLength:0
) does not show the new values in newList
until I type and the suggestions are filtered down. Any ideas?
It looks like the problem resides in typeahead, for testing purposes I set a source
function and realized that the default suggestions are somehow cached (i.e., the source function is called only after I enter something into the textbox). So it is no wonder, that the updated bloodhound data is not yet used - it is never queried :-)
Is there a better solution than to recreate the whole typeahead control? Something alike .typeahead('clearcache')
?
I also encountered this bug.
Did anyone do something about it?
Did anyone do something about it?
Is this resolved ?