Hi I am using typeahead in twitter bootstrap. What I found here is that in autocomplete dropdown, it selects first option by default. My requirement is that initially it should have nothing selected, it goes to first option only when I press navigation key (up or down) or when I hover over it. Is it possibe using typeahead.
To avoid selection by typeahead first option by default, I used parameter documented in official docs: autoSelect. By default it set to 'true'
My code:
$('#searchString', this.el).typeahead({
source: function (query, process) {
var q = '/autocompleteSearch?searchString=' + query;
return $.get(q, function (data) {
return process(data);
});
},
minLength: 3,
autoSelect: false
});