From c6093f4c49144f0c88a3d43623543e06123aa249 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 23 Sep 2022 18:47:46 +0800 Subject: [PATCH] feat(nocodb): take grouping column id from form input --- packages/nocodb/src/lib/models/View.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/nocodb/src/lib/models/View.ts b/packages/nocodb/src/lib/models/View.ts index 51886c1a4a..740b445d56 100644 --- a/packages/nocodb/src/lib/models/View.ts +++ b/packages/nocodb/src/lib/models/View.ts @@ -225,6 +225,7 @@ export default class View implements ViewType { view: Partial & Partial & { copy_from_id?: string; + grp_column_id?: string; created_at?; updated_at?; }, @@ -310,12 +311,8 @@ export default class View implements ViewType { ); break; case ViewTypes.KANBAN: - // Preset a grouping field by choosing the first single select field - // TODO: let users to choose in kanban create modal - const singleSelectColumns = columns.filter( - (c) => c.uidt === UITypes.SingleSelect - )[0]; - (view as KanbanView).grp_column_id = singleSelectColumns?.id; + // set grouping field + (view as KanbanView).grp_column_id = view.grp_column_id; await KanbanView.insert( {