This commit is contained in:
@@ -208,10 +208,13 @@ export default {
|
||||
default: "{}",
|
||||
type: String
|
||||
},
|
||||
formKey: String, //used to grab template from store
|
||||
formKey: { type: String, default: "" }, //used to grab template from store
|
||||
readonly: Boolean,
|
||||
disabled: Boolean,
|
||||
parentVM: Object
|
||||
parentVM: {
|
||||
default: null,
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -238,13 +241,11 @@ export default {
|
||||
return template.find(z => z.type != undefined);
|
||||
},
|
||||
GetValueForField: function(dataKey) {
|
||||
if (this.value == null) {
|
||||
//return null;
|
||||
this.value = "{}";
|
||||
}
|
||||
|
||||
let cData = {};
|
||||
//get the data out of the JSON string value
|
||||
let cData = JSON.parse(this.value);
|
||||
if (this.value != null) {
|
||||
cData = JSON.parse(this.value);
|
||||
}
|
||||
|
||||
//Custom field types can be changed by the user and cause old entered data to be invalid for that field type
|
||||
//Here we need to take action if the data is of an incompatible type for the control field type and attempt to coerce or simply nullify if not co-ercable the data
|
||||
@@ -334,10 +335,11 @@ export default {
|
||||
SetValueForField: function(dataKey, newValue) {
|
||||
//Get the current data out of the json string value
|
||||
//
|
||||
if (this.value == null) {
|
||||
this.value = "{}";
|
||||
let cData = {};
|
||||
if (this.value != null) {
|
||||
cData = JSON.parse(this.value);
|
||||
}
|
||||
let cData = JSON.parse(this.value);
|
||||
|
||||
if (!window.$gz.util.has(cData, dataKey)) {
|
||||
cData[dataKey] = null;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@ export default {
|
||||
return true;
|
||||
},
|
||||
input(e) {
|
||||
console.log("input", e);
|
||||
this.tagSearchEntry = "";
|
||||
this.$emit("input", e);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user