From ca5f1e7c277513f451300224a01c836310303d32 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 10 Sep 2022 17:09:06 +0800 Subject: [PATCH] feat(nc-gui): integrate with new formattedKanbanData structure --- .../nc-gui/components/smartsheet/Kanban.vue | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue index 88c2d3b07a..8204fde333 100644 --- a/packages/nc-gui/components/smartsheet/Kanban.vue +++ b/packages/nc-gui/components/smartsheet/Kanban.vue @@ -108,12 +108,8 @@ const expandFormClick = async (e: MouseEvent, row: RowType) => { } async function onMove(event: any, stackKey: string) { - // const { newIndex, element, oldIndex } = event.added || event.moved || event.removed if (event.added) { - // TODO: change current groupingField to stackKey - console.log(event.added.element) - console.log(stackKey) - // TODO: groupField + // TODO: update groupingField const groupingField = 'singleSelect2' const ele = event.added.element ele.row[groupingField] = stackKey @@ -125,34 +121,37 @@ openNewRecordFormHook?.on(async () => { const newRow = await addEmptyRow() expandForm(newRow) }) - -const stacks = ref([]) -stacks.value = Object.keys(formattedKanbanData) -watch(formattedKanbanData, (v) => { - if (v) { - stacks.value = Object.keys(v).map((o, id) => ({ key: o, id })) - } -})