I am using bootstrap-typeahead and rails4.
I can get the dropdown feature but when I press up and down, I don't want the selected value to fill in the input. How can I implement this?
I tried some solutions but they didn't work. How to prevent Twitter typeahead from filling in the input with the selected value?
Relevant code:
$("#nav_search").typeahead({
items: 6,
source:numbers.ttAdapter(),
displayText: function(data){
// console.log(data);
return '<div><strong>'+data.username+'</strong>'+'-'+data.position+' at '+data.company+'</div>';
},
fitToElement: true,
afterSelect: function(data){
window.location.href=data.url;
}
})