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

Filter list of nodes on node type

This commit is contained in:
JeanCarl Bisson 2020-06-03 10:33:35 -07:00
parent b6fbe7d07d
commit aa8f4af339
4 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@
search.searchBox("count",""); search.searchBox("count","");
} else { } else {
var count = dirList.treeList("filter", function(item) { var count = dirList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
}); });
search.searchBox("count",count+" / "+candidateNodes.length); search.searchBox("count",count+" / "+candidateNodes.length);
} }

View File

@ -71,7 +71,7 @@
search.searchBox("count",""); search.searchBox("count","");
} else { } else {
var count = dirList.treeList("filter", function(item) { var count = dirList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
}); });
search.searchBox("count",count+" / "+candidateNodes.length); search.searchBox("count",count+" / "+candidateNodes.length);
} }

View File

@ -59,7 +59,7 @@
search.searchBox("count",""); search.searchBox("count","");
} else { } else {
var count = dirList.treeList("filter", function(item) { var count = dirList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
}); });
search.searchBox("count",count+" / "+candidateNodes.length); search.searchBox("count",count+" / "+candidateNodes.length);
} }

View File

@ -59,7 +59,7 @@
search.searchBox("count",""); search.searchBox("count","");
} else { } else {
var count = treeList.treeList("filter", function(item) { var count = treeList.treeList("filter", function(item) {
return item.label.indexOf(val) > -1 return item.label.indexOf(val) > -1 || item.node.type.indexOf(val) > -1
}); });
search.searchBox("count",count+" / "+candidateNodes.length); search.searchBox("count",count+" / "+candidateNodes.length);
} }