Browse Source

fix(gui-v2): emit issue

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

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

@ -50,10 +50,11 @@ const uiTypesOptions = computed<typeof uiTypes>(() => {
]
})
const reloadMetaAndData = () => {
const reloadMetaAndData = async () => {
emit('cancel')
getMeta(meta?.value.id as string, true)
await getMeta(meta?.value.id as string, true)
reloadDataTrigger?.trigger()
emit('submit')
}
function onCancel() {
@ -170,8 +171,7 @@ watch(
@click="
() => {
addOrUpdate(reloadMetaAndData)
advancedOptions = false
emit('submit')
advancedOptions.value = false
}
"
>

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

@ -279,7 +279,6 @@ function onEmailChange() {
}
async function submitCallback() {
console.log('submitCallback')
await loadFormView()
setFormData()
showColumnDropdown.value = false
@ -410,7 +409,7 @@ onMounted(async () => {
</div>
</a-button>
<SmartsheetColumnEditOrAdd
v-if="showColumnDropdown"
v-show="showColumnDropdown"
ref="editOrAddRef"
@submit="submitCallback"
@cancel="showColumnDropdown = false"

Loading…
Cancel
Save