bugfix set void values from callout (#262)

pull/3759/head
Leonel Matos 2020-01-24 11:37:20 -04:00 committed by Yamel Senih
parent e576a5d201
commit 997b7fcfe3
2 changed files with 13 additions and 3 deletions

View File

@ -49,7 +49,7 @@ export default {
blanckOption: {
// label with '' value is assumed to be undefined non-existent
label: ' ',
key: undefined
key: undefined || -1
}
}
},
@ -106,6 +106,10 @@ export default {
},
'metadata.value'(value) {
if (!this.metadata.inTable) {
if (!this.options.some(option => option.key === value)) {
this.value = value
this.getDataLookupItem()
}
this.value = value
}
},

View File

@ -40,11 +40,17 @@ const callOutControl = {
windowNo: window.windowIndex
})
.then(calloutResponse => {
const newValues = {}
Object.keys(calloutResponse.values).forEach(key => {
if (calloutResponse.values[key] !== undefined) {
newValues[key] = calloutResponse.values[key]
}
})
if (inTable) {
dispatch('notifyRowTableChange', {
parentUuid,
containerUuid,
row: calloutResponse.values,
row: newValues,
isEdit: true
})
} else {
@ -52,7 +58,7 @@ const callOutControl = {
parentUuid,
containerUuid,
panelType: 'window',
newValues: calloutResponse.values,
newValues,
isSendToServer: false,
withOutColumnNames,
isSendCallout: false