diff --git a/packages/node_modules/@node-red/nodes/core/common/60-link.html b/packages/node_modules/@node-red/nodes/core/common/60-link.html index 05fa8b429..9408b5561 100644 --- a/packages/node_modules/@node-red/nodes/core/common/60-link.html +++ b/packages/node_modules/@node-red/nodes/core/common/60-link.html @@ -68,6 +68,8 @@ } }); var candidateNodes = RED.nodes.filterNodes({type:targetType}); + var candidateNodesCount = 0; + var search = $("#node-input-link-target-filter").searchBox({ style: "compact", delay: 300, @@ -80,7 +82,7 @@ var count = treeList.treeList("filter", function(item) { return item.label.toLowerCase().indexOf(val) > -1 || (item.node && item.node.type.toLowerCase().indexOf(val) > -1) }); - search.searchBox("count",count+" / "+candidateNodes.length); + search.searchBox("count",count+" / "+candidateNodesCount); } } }); @@ -113,6 +115,11 @@ candidateNodes.forEach(function(n) { if (flowMap[n.z]) { + if (targetType === "link out" && n.mode === 'return') { + // Link In nodes looking for Link Out nodes should not + // include return-mode nodes. + return + } var isChecked = false; isChecked = (node.links.indexOf(n.id) !== -1) || (n.links||[]).indexOf(node.id) !== -1; if (isChecked) { @@ -126,6 +133,7 @@ checkbox: node.type !== "link call", radio: node.type === "link call" }) + candidateNodesCount++; } }); flows = flows.filter(function(f) { return f.children.length > 0 })