Add filterMethod to hint dropdown
This commit is contained in:
parent
6d2d2b2bd1
commit
b16a38c8a2
|
@ -42,6 +42,18 @@
|
|||
super.renderContent();
|
||||
droplab.setData(this.hookId, dropdownData);
|
||||
}
|
||||
|
||||
filterMethod(item, query) {
|
||||
const { value } = gl.FilteredSearchTokenizer.getLastTokenObject(query);
|
||||
|
||||
if (value === '') {
|
||||
item.droplab_hidden = false;
|
||||
} else {
|
||||
item.droplab_hidden = item['hint'].indexOf(value) === -1;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
global.DropdownHint = DropdownHint;
|
||||
|
|
Loading…
Reference in New Issue