typeahead.js icon indicating copy to clipboard operation
typeahead.js copied to clipboard

Updating Bloodhound local does not update typeahead's default suggestions

Open drauch opened this issue 8 years ago • 6 comments

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?

drauch avatar Oct 29 '16 19:10 drauch

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 :-)

drauch avatar Oct 29 '16 19:10 drauch

Is there a better solution than to recreate the whole typeahead control? Something alike .typeahead('clearcache')?

drauch avatar Oct 29 '16 19:10 drauch

I also encountered this bug.

wachunga avatar Apr 04 '17 22:04 wachunga

Did anyone do something about it?

koubi avatar Oct 01 '17 14:10 koubi

Did anyone do something about it?

rohith-reddyy avatar Jan 29 '20 13:01 rohith-reddyy

Is this resolved ?

divyajyotiuk avatar Dec 21 '21 12:12 divyajyotiuk