|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import type { TableType, ViewType } from 'nocodb-sdk' |
|
|
|
|
import { isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
|
import { ViewTypes, isLinksOrLTAR, isSystemColumn, isVirtualCol } from 'nocodb-sdk' |
|
|
|
|
import type { Ref } from 'vue' |
|
|
|
|
import MdiChevronDown from '~icons/mdi/chevron-down' |
|
|
|
|
|
|
|
|
@ -47,6 +47,8 @@ const props = defineProps<Props>()
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(['update:modelValue', 'cancel', 'next', 'prev']) |
|
|
|
|
|
|
|
|
|
const { activeView } = storeToRefs(useViewsStore()) |
|
|
|
|
|
|
|
|
|
const key = ref(0) |
|
|
|
|
|
|
|
|
|
const wrapper = ref() |
|
|
|
@ -86,6 +88,8 @@ const { isUIAllowed } = useRoles()
|
|
|
|
|
|
|
|
|
|
const reloadTrigger = inject(ReloadRowDataHookInj, createEventHook()) |
|
|
|
|
|
|
|
|
|
const { addOrEditStackRow } = useKanbanViewStoreOrThrow() |
|
|
|
|
|
|
|
|
|
// override cell click hook to avoid unexpected behavior at form fields |
|
|
|
|
provide(CellClickHookInj, undefined) |
|
|
|
|
|
|
|
|
@ -184,7 +188,16 @@ const save = async () => {
|
|
|
|
|
await syncLTARRefs(data) |
|
|
|
|
reloadTrigger?.trigger() |
|
|
|
|
} else { |
|
|
|
|
await _save() |
|
|
|
|
let kanbanClbk |
|
|
|
|
if (activeView.value?.type === ViewTypes.KANBAN) { |
|
|
|
|
kanbanClbk = (row: any, isNewRow: boolean) => { |
|
|
|
|
addOrEditStackRow(row, isNewRow) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
await _save(undefined, undefined, { |
|
|
|
|
kanbanClbk, |
|
|
|
|
}) |
|
|
|
|
reloadTrigger?.trigger() |
|
|
|
|
} |
|
|
|
|
isUnsavedFormExist.value = false |
|
|
|
|