Javascript typeahead-minLength触发建议列表
我将minLength设置为3,以在至少输入3个字符时触发建议列表 但当输入1个字符时,下拉列表将打开。如何做到这一点Javascript typeahead-minLength触发建议列表,javascript,typeahead.js,bloodhound,Javascript,Typeahead.js,Bloodhound,我将minLength设置为3,以在至少输入3个字符时触发建议列表 但当输入1个字符时,下拉列表将打开。如何做到这一点 $('#remote .typeahead').typeahead(null, { name: 'best-pictures', display: 'value', source: bestPictures, minLength: 3 }); 小提琴: 根据这里的文档-,第一个参数是options,不能为空 将其更改为following,它应该可以工作 $('
$('#remote .typeahead').typeahead(null, {
name: 'best-pictures',
display: 'value',
source: bestPictures,
minLength: 3
});
小提琴:
根据这里的文档-,第一个参数是options,不能为空 将其更改为following,它应该可以工作
$('#remote .typeahead').typeahead({minLength: 3}, {
name: 'best-pictures',
display: 'value',
source: bestPictures,
});