diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js index 77eb905f4..71ad2b196 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-help.js @@ -64,15 +64,17 @@ RED.sidebar.help = (function() { style: "compact", delay: 100, change: function() { - var val = $(this).val().toLowerCase(); - if (val) { + const searchFor = $(this).val().toLowerCase(); + if (searchFor) { showTOC(); - var c = treeList.treeList('filter',function(item) { + treeList.treeList('filter',function(item) { if (item.depth === 0) { return true; } - return (item.nodeType && item.nodeType.indexOf(val) > -1) || - (item.subflowLabel && item.subflowLabel.indexOf(val) > -1) + let found = item.nodeType && item.nodeType.toLowerCase().indexOf(searchFor) > -1; + found = found || item.subflowLabel && item.subflowLabel.toLowerCase().indexOf(searchFor) > -1; + found = found || item.palleteLabel && item.palleteLabel.toLowerCase().indexOf(searchFor) > -1; + return found; },true) } else { treeList.treeList('filter',null); @@ -224,17 +226,21 @@ RED.sidebar.help = (function() { moduleNames.forEach(function(moduleName) { - var module = modules[moduleName]; - var nodeTypes = []; - - var setNames = Object.keys(module.sets); + const module = modules[moduleName]; + const nodeTypes = []; + const moduleSets = module.sets; + const setNames = Object.keys(moduleSets); setNames.forEach(function(setName) { - module.sets[setName].types.forEach(function(nodeType) { + const moduleSet = moduleSets[setName]; + moduleSet.types.forEach(function(nodeType) { if ($("script[data-help-name='"+nodeType+"']").length) { + const n = {_def:RED.nodes.getType(nodeType),type:nodeType} + n.name = getNodePaletteLabel(n); nodeTypes.push({ id: "node-type:"+nodeType, nodeType: nodeType, - element:getNodeLabel({_def:RED.nodes.getType(nodeType),type:nodeType}) + palleteLabel: n.name, + element: getNodeLabel(n) }) } }) @@ -254,18 +260,21 @@ RED.sidebar.help = (function() { treeList.treeList("data",helpData); } - function getNodeLabel(n) { - var div = $('