提交 f9646d3e 编写于 作者: D Douwe Maan

Highlight first user autocomplete option

上级 c69e3942
......@@ -35,7 +35,7 @@
DefaultOptions: {
sorter: function(query, items, searchKey) {
// Highlight first item only if at least one char was typed
this.setting.highlightFirst = query.length > 0;
this.setting.highlightFirst = this.setting.alwaysHighlightFirst || query.length > 0;
if ((items[0].name != null) && items[0].name === 'loading') {
return items;
}
......@@ -117,6 +117,7 @@
insertTpl: '${atwho-at}${username}',
searchKey: 'search',
data: ['loading'],
alwaysHighlightFirst: true,
callbacks: {
sorter: this.DefaultOptions.sorter,
filter: this.DefaultOptions.filter,
......@@ -363,4 +364,3 @@
};
}).call(this);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册