From ea4c0cdbee4918099f6ae115cd7f682d60105329 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 14 Dec 2023 17:14:56 +0000 Subject: [PATCH] Fix error when switching context types --- .../editor-client/src/js/ui/common/typedInput.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 cb834c454..5c6b1a38e 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 @@ -81,7 +81,6 @@ const msgAutoComplete = function(options) { return function(val) { - console.log('msgAutoComplete', val) var matches = []; options.forEach(opt => { const optVal = opt.value; @@ -132,7 +131,7 @@ } else { // console.log('GET', url) $.getJSON(url, function(data) { - console.log(data) + // console.log(data) cache[url] = true const result = data[store] || {} const keys = result.keys || [] @@ -182,7 +181,6 @@ return function(val, done) { getContextKeys(val, function (keys) { - console.log(keys) const matches = [] keys.forEach(v => { let optVal = v @@ -1122,7 +1120,9 @@ this.input.val(this.oldValues.hasOwnProperty("_")?this.oldValues["_"]:(opt.default||"")) } if (previousType.autoComplete) { - this.input.autoComplete("destroy"); + if (this.input.hasClass('red-ui-autoComplete')) { + this.input.autoComplete("destroy"); + } } } this.propertyType = type;