Commit b16a38c8 authored by Clement Ho's avatar Clement Ho

Add filterMethod to hint dropdown

parent 6d2d2b2b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment