From 59ea7a4f7027d685e553467159d10a88c476ce53 Mon Sep 17 00:00:00 2001 From: Kazuhito Yokoi Date: Mon, 8 Jan 2024 03:12:36 +0900 Subject: [PATCH] Fix subflow ports in Quick Add dialog --- .../@node-red/editor-client/src/js/ui/typeSearch.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js b/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js index 872169828..3d05fd1c8 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/typeSearch.js @@ -186,8 +186,15 @@ RED.typeSearch = (function() { var iconContainer = $('
',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv); RED.utils.createIconElement(icon_url, iconContainer, false); - - if (!/^_action_:/.test(object.type) && object.type !== "junction") { + if (/^subflow:/.test(object.type)) { + var sf = RED.nodes.subflow(object.type.substring(8)); + if (sf.in.length > 0) { + $('
',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv); + } + if (sf.out.length > 0) { + $('
',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv); + } + } else if (!/^_action_:/.test(object.type) && object.type !== "junction") { if (def.inputs > 0) { $('
',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv); }