javascript - Twitter typeahead 未突出显示该元素
问题描述
我有一个下拉列表,当我在搜索中查找某些内容并尝试通过向下箭头进行选择时,它不是阴影和/或突出显示元素。我为此使用 typeahead.js。
$('#theSearchBox').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'HOUSES',
source: substringMatcher(
function(){
let items=[];
for(let key in SCHOOLS){
items.push(HOUSES[key].House);
}
return items;
}()
),
limit: 10
}
);
$('#theSearchBox2').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'HOUSES',
source: substringMatcher(
function(){
let items=[];
for(let key in HOUSES){
items.push(HOUSES[key].House);
}
return items;
}()
),
limit: 10
}
);
解决方案
推荐阅读
- reactjs - 即使添加了 jsconfig,Visual Studio Code React 也没有显示错误
- scala - 如何为 Java 集合制作 mutable.Builder?
- oracle11g - 方法 DBMSOUTPUT_LINESARRAY (Oracle) 到字符串
- python - 向量化逐行 numpy 操作
- pandas - 使 groupby.apply 更高效或转换为 spark
- coldfusion - 更新查询不使用 CFQUERYPARAM 更新整数字段
- c# - 我应该在 foreach C# 中调用 ToList()
- android - 公开 google-service.json(来自 Firebase)是否安全?
- reactjs - 我的应用程序中的子组件可以使用上下文与主应用程序组件进行通信吗?
- javascript - 如何在下面的示例中使用正则表达式?