From fded1e002186cb51f8b90378910d2357faba7434 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 14 Oct 2021 21:47:49 +0100 Subject: [PATCH] Refix #3170 - copy switch rule type when adding new rule --- .../node_modules/@node-red/nodes/core/function/10-switch.html | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/node_modules/@node-red/nodes/core/function/10-switch.html b/packages/node_modules/@node-red/nodes/core/function/10-switch.html index 1f86fbc3c..e0827b40f 100644 --- a/packages/node_modules/@node-red/nodes/core/function/10-switch.html +++ b/packages/node_modules/@node-red/nodes/core/function/10-switch.html @@ -211,6 +211,7 @@ var lastRule = $("#node-input-rule-container").editableList('getItemAt',i-1); var exportedRule = exportRule(lastRule.element); opt.r.vt = exportedRule.vt; + opt.r.v = ""; // We could copy the value over as well and preselect it (see the 'activeElement' code below) // But not sure that feels right. Is copying over the last value 'expected' behaviour? // It would make sense for an explicit 'copy' action, but not sure where the copy button would