mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix broken text input in the switch node (again)
This commit is contained in:
		| @@ -103,7 +103,6 @@ | ||||
|             } else if (type === "istype") { | ||||
|                 r.v = 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") { | ||||
|                 r.v = rule.find(".node-input-rule-exp-value").typedInput('value'); | ||||
|                 r.vt = rule.find(".node-input-rule-exp-value").typedInput('type'); | ||||
| @@ -218,7 +217,11 @@ | ||||
|                         if (i > 0) { | ||||
|                             var lastRule = $("#node-input-rule-container").editableList('getItemAt',i-1); | ||||
|                             var exportedRule = exportRule(lastRule.element); | ||||
|                             opt.r.vt = exportedRule.vt; | ||||
|                             if (exportedRule.t === "istype") { | ||||
|                                 opt.r.vt = (exportedRule.vt === "number") ? "num" : "str"; | ||||
|                             } else { | ||||
|                                 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? | ||||
|   | ||||
		Reference in New Issue
	
	Block a user