Browse Source

refactor(nc-gui): move handleExpandedFormCancel to removeRowFromUncategorizedStack

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
b54637fd7d
  1. 10
      packages/nc-gui/components/smartsheet/Kanban.vue

10
packages/nc-gui/components/smartsheet/Kanban.vue

@ -53,6 +53,7 @@ const {
groupingField,
countByStack,
deleteStack,
removeRowFromUncategorizedStack,
} = useKanbanViewData(meta, view)
const { isUIAllowed } = useUIPermission()
@ -160,13 +161,6 @@ const handleCollapseStack = async (stackIdx: number) => {
await updateKanbanStackMeta()
}
const handleExpandedFormCancel = () => {
// remove the empty record
formattedData.value.uncategorized.pop()
// decrease total count by 1
countByStack.value.uncategorized -= 1
}
openNewRecordFormHook?.on(async (stackTitle) => {
const newRow = await addEmptyRow()
// preset the grouping field value
@ -358,7 +352,7 @@ onMounted(() => {
:row="expandedFormRow"
:state="expandedFormRowState"
:meta="meta"
@cancel="handleExpandedFormCancel"
@cancel="removeRowFromUncategorizedStack"
/>
<a-modal v-model:visible="deleteStackVModel" class="!top-[35%]" wrap-class-name="nc-modal-view-create">
<template #title>

Loading…
Cancel
Save