diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
index 9092d4dcf..2d628769e 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
@@ -556,7 +556,7 @@
this.optionExpandButton = $('').appendTo(this.uiSelect);
this.optionExpandButtonIcon = $('').appendTo(this.optionExpandButton);
- this.type(this.options.default||this.typeList[0].value);
+ this.type(this.typeField.val() || this.options.default||this.typeList[0].value);
this.typeChanged = !!this.options.default;
}catch(err) {
console.log(err.stack);
@@ -805,6 +805,7 @@
var that = this;
var currentType = this.type();
this.typeMap = {};
+ var firstCall = (this.typeList === undefined);
this.typeList = types.map(function(opt) {
var result;
if (typeof opt === 'string') {
@@ -829,10 +830,14 @@
}
this.menu = this._createMenu(this.typeList,{},function(v) { that.type(v) });
if (currentType && !this.typeMap.hasOwnProperty(currentType)) {
- this.type(this.typeList[0].value);
+ if (!firstCall) {
+ this.type(this.typeList[0].value);
+ }
} else {
this.propertyType = null;
- this.type(currentType);
+ if (!firstCall) {
+ this.type(currentType);
+ }
}
if (this.typeList.length === 1 && !this.typeList[0].icon && (!this.typeList[0].label || this.typeList[0].showLabel === false)) {
this.selectTrigger.hide()