mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix error when switching context types
This commit is contained in:
parent
7197153fd5
commit
ea4c0cdbee
@ -81,7 +81,6 @@
|
|||||||
|
|
||||||
const msgAutoComplete = function(options) {
|
const msgAutoComplete = function(options) {
|
||||||
return function(val) {
|
return function(val) {
|
||||||
console.log('msgAutoComplete', val)
|
|
||||||
var matches = [];
|
var matches = [];
|
||||||
options.forEach(opt => {
|
options.forEach(opt => {
|
||||||
const optVal = opt.value;
|
const optVal = opt.value;
|
||||||
@ -132,7 +131,7 @@
|
|||||||
} else {
|
} else {
|
||||||
// console.log('GET', url)
|
// console.log('GET', url)
|
||||||
$.getJSON(url, function(data) {
|
$.getJSON(url, function(data) {
|
||||||
console.log(data)
|
// console.log(data)
|
||||||
cache[url] = true
|
cache[url] = true
|
||||||
const result = data[store] || {}
|
const result = data[store] || {}
|
||||||
const keys = result.keys || []
|
const keys = result.keys || []
|
||||||
@ -182,7 +181,6 @@
|
|||||||
|
|
||||||
return function(val, done) {
|
return function(val, done) {
|
||||||
getContextKeys(val, function (keys) {
|
getContextKeys(val, function (keys) {
|
||||||
console.log(keys)
|
|
||||||
const matches = []
|
const matches = []
|
||||||
keys.forEach(v => {
|
keys.forEach(v => {
|
||||||
let optVal = v
|
let optVal = v
|
||||||
@ -1122,7 +1120,9 @@
|
|||||||
this.input.val(this.oldValues.hasOwnProperty("_")?this.oldValues["_"]:(opt.default||""))
|
this.input.val(this.oldValues.hasOwnProperty("_")?this.oldValues["_"]:(opt.default||""))
|
||||||
}
|
}
|
||||||
if (previousType.autoComplete) {
|
if (previousType.autoComplete) {
|
||||||
this.input.autoComplete("destroy");
|
if (this.input.hasClass('red-ui-autoComplete')) {
|
||||||
|
this.input.autoComplete("destroy");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.propertyType = type;
|
this.propertyType = type;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user