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