Browse Source

fix(gui): on add/edit column form validation failure keep the form open

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3569/head
Pranav C 2 years ago
parent
commit
30788e3ee1
  1. 4
      packages/nc-gui/components/smartsheet-column/EditOrAdd.vue
  2. 1
      packages/nc-gui/composables/useColumnCreateStore.ts

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

@ -53,7 +53,9 @@ const reloadMetaAndData = async () => {
}
async function onSubmit() {
await addOrUpdate(reloadMetaAndData)
const saved = await addOrUpdate(reloadMetaAndData)
if (!saved) return
// add delay to complete the minimize transition
setTimeout(() => {

1
packages/nc-gui/composables/useColumnCreateStore.ts

@ -206,6 +206,7 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
$e('a:column:add', { datatype: formState.value.uidt })
}
onSuccess?.()
return true
} catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e))
}

Loading…
Cancel
Save