Merge pull request #2143 from p2004a/fix-filteredlist-behaviour
Changed FilteredList.setFilter unique matches computing in autocomplete.js
This commit is contained in:
commit
706f2ea172
1 changed files with 1 additions and 1 deletions
|
|
@ -345,7 +345,7 @@ var FilteredList = function(array, filterText, mutateData) {
|
|||
// make unique
|
||||
var prev = null;
|
||||
matches = matches.filter(function(item){
|
||||
var caption = item.value || item.caption || item.snippet;
|
||||
var caption = item.snippet || item.caption || item.value;
|
||||
if (caption === prev) return false;
|
||||
prev = caption;
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue