diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index c6d610e3ff..73c69c3c5a 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -339,13 +339,15 @@ async function submitForm() { } } - await insertRow({ + const res = await insertRow({ row: { ...formState.value, ...state.value }, oldRow: {}, rowMeta: { new: true }, }) - submitted.value = true + if (res) { + submitted.value = true + } } async function clearForm() { diff --git a/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue b/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue index 1486d85348..9b6f1e5dfb 100644 --- a/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue @@ -66,7 +66,7 @@ const relation = computed(() => { const linkRow = async (row: Record, id: number) => { if (isNew.value) { - addLTARRef(row, injectedColumn?.value as ColumnType) + await addLTARRef(row, injectedColumn?.value as ColumnType) if (relation.value === 'oo' || relation.value === 'bt') { isChildrenExcludedListLinked.value.forEach((isLinked, idx) => { if (isLinked) { diff --git a/packages/nc-gui/utils/dataUtils.ts b/packages/nc-gui/utils/dataUtils.ts index a365d13cfe..5628f492d0 100644 --- a/packages/nc-gui/utils/dataUtils.ts +++ b/packages/nc-gui/utils/dataUtils.ts @@ -81,6 +81,7 @@ export async function populateInsertObject({ throwError?: boolean undo?: boolean }) { + debugger const missingRequiredColumns = new Set() const insertObj = await meta.columns?.reduce(async (_o: Promise, col) => { const o = await _o