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

View File

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