Browse Source

wip(gui-v2): submit callback issue

pull/3030/head
Wing-Kam Wong 2 years ago
parent
commit
8fc1863b11
  1. 4
      packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue
  2. 4
      packages/nc-gui-v2/components/smartsheet/Form.vue

4
packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue

@ -45,12 +45,12 @@ const reloadMeta = async () => {
}
async function handleSubmit() {
// FIXME: emit only works when putting before addOrUpdate
await addOrUpdate(async () => {
await reloadMeta()
// FIXME: emit not working
await emit('submit')
advancedOptions.value = false
})
emit('submit')
}
// create column meta if it's a new column

4
packages/nc-gui-v2/components/smartsheet/Form.vue

@ -279,6 +279,7 @@ function onEmailChange() {
}
async function submitCallback() {
console.log("submitCallback")
await loadFormView()
setFormData()
showColumnDropdown.value = false
@ -408,12 +409,9 @@ onMounted(async () => {
{{ $t('activity.addField') }}
</div>
</a-button>
<!-- TODO #1: make the component out of sidebar -->
<!-- TODO #2: reload view -->
<SmartsheetColumnEditOrAdd
v-if="showColumnDropdown"
ref="editOrAddRef"
@click.stop
@submit="submitCallback"
@cancel="showColumnDropdown = false"
/>

Loading…
Cancel
Save