From 234bffe42c02ba3ab998a15d55ee9a5dd72e017c Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 17 Sep 2022 19:56:41 +0800 Subject: [PATCH] feat(nc-gui): reset formattedData & countByStack when adding a field & add delete stack for option deletion --- packages/nc-gui/composables/useKanbanViewData.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nc-gui/composables/useKanbanViewData.ts b/packages/nc-gui/composables/useKanbanViewData.ts index ec0d9323e5..83cc6faf1c 100644 --- a/packages/nc-gui/composables/useKanbanViewData.ts +++ b/packages/nc-gui/composables/useKanbanViewData.ts @@ -139,6 +139,8 @@ export function useKanbanViewData( ...option, collapsed: false, }) + formattedData.value[option.title!] = [] + countByStack.value[option.title!] = 0 isChanged = true } } @@ -150,6 +152,7 @@ export function useKanbanViewData( .forEach(({ id }) => { const idx = stackMetaObj.value[grp_column_id].map((ele: Record) => ele.id).indexOf(id) if (idx !== -1) { + deleteStack(stackMetaObj.value[grp_column_id][idx].title!) stackMetaObj.value[grp_column_id].splice(idx, 1) } })