1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Hide common entries when filtering typeSearch

This commit is contained in:
Nick O'Leary 2017-01-01 21:59:09 +00:00
parent 18a519f9ed
commit 061cc908a7
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -95,7 +95,7 @@ RED.typeSearch = (function() {
if (activeFilter === "" ) { if (activeFilter === "" ) {
return true; return true;
} }
if (data.recent) { if (data.recent || data.common) {
return false; return false;
} }
return (activeFilter==="")||(data.index.indexOf(activeFilter) > -1); return (activeFilter==="")||(data.index.indexOf(activeFilter) > -1);
@ -266,6 +266,7 @@ RED.typeSearch = (function() {
for(i=0;i<common.length;i++) { for(i=0;i<common.length;i++) {
item = { item = {
type: common[i], type: common[i],
common: true,
def: RED.nodes.getType(common[i]) def: RED.nodes.getType(common[i])
}; };
item.label = getTypeLabel(item.type,item.def); item.label = getTypeLabel(item.type,item.def);