I am using Twitter Typeahead . There is a problem, when I preloaded the data in my text field and in the blur event, the text field is cleared. This is a known issue within the type ahead, and it says that it has been fixed. But I canโt figure out how to implement the fix.
I have my typeahead that is initialized as a (document).ready function
$('#myTextbox').typeahead({ name: 'Typeahead', valueKey: "Value", remote: '/ServiceHandlers/myHandler.ashx?Method=Typeahead&Query=%QUERY', template: ['<p>{{Value}}</p>'], engine: Hogan });
The question says add something like
$('.typeahead').typeahead('setQuery', '');
But I canโt figure out where this will go. Any suggestions to fix this problem?
source share