mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix broken text input in the switch node (again)
This commit is contained in:
parent
877aa75e4e
commit
9caa6a3553
@ -103,7 +103,6 @@
|
|||||||
} else if (type === "istype") {
|
} else if (type === "istype") {
|
||||||
r.v = rule.find(".node-input-rule-type-value").typedInput('type');
|
r.v = rule.find(".node-input-rule-type-value").typedInput('type');
|
||||||
r.vt = rule.find(".node-input-rule-type-value").typedInput('type');
|
r.vt = rule.find(".node-input-rule-type-value").typedInput('type');
|
||||||
r.vt = (r.vt === "number") ? "num" : "str";
|
|
||||||
} else if (type === "jsonata_exp") {
|
} else if (type === "jsonata_exp") {
|
||||||
r.v = rule.find(".node-input-rule-exp-value").typedInput('value');
|
r.v = rule.find(".node-input-rule-exp-value").typedInput('value');
|
||||||
r.vt = rule.find(".node-input-rule-exp-value").typedInput('type');
|
r.vt = rule.find(".node-input-rule-exp-value").typedInput('type');
|
||||||
@ -218,7 +217,11 @@
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
var lastRule = $("#node-input-rule-container").editableList('getItemAt',i-1);
|
var lastRule = $("#node-input-rule-container").editableList('getItemAt',i-1);
|
||||||
var exportedRule = exportRule(lastRule.element);
|
var exportedRule = exportRule(lastRule.element);
|
||||||
|
if (exportedRule.t === "istype") {
|
||||||
|
opt.r.vt = (exportedRule.vt === "number") ? "num" : "str";
|
||||||
|
} else {
|
||||||
opt.r.vt = exportedRule.vt;
|
opt.r.vt = exportedRule.vt;
|
||||||
|
}
|
||||||
opt.r.v = "";
|
opt.r.v = "";
|
||||||
// We could copy the value over as well and preselect it (see the 'activeElement' code below)
|
// 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?
|
// But not sure that feels right. Is copying over the last value 'expected' behaviour?
|
||||||
|
Loading…
Reference in New Issue
Block a user