0
私はbootstrap-typeaheadとrails4を使用しています。タイプアヘッドが選択した値で入力を埋めるのを防ぐにはどうすればいいですか?
私はドロップダウン機能を利用できますが、上下に押すと、選択した値を入力したくない場合があります。これをどのように実装できますか?
私はいくつかのソリューションを試しましたが、機能しませんでした。 How to prevent Twitter typeahead from filling in the input with the selected value?
関連するコード:
$("#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;
}
})