Browse Source

feat(nocodb): take grouping column id from form input

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
c6093f4c49
  1. 9
      packages/nocodb/src/lib/models/View.ts

9
packages/nocodb/src/lib/models/View.ts

@ -225,6 +225,7 @@ export default class View implements ViewType {
view: Partial<View> & view: Partial<View> &
Partial<FormView | GridView | GalleryView | KanbanView> & { Partial<FormView | GridView | GalleryView | KanbanView> & {
copy_from_id?: string; copy_from_id?: string;
grp_column_id?: string;
created_at?; created_at?;
updated_at?; updated_at?;
}, },
@ -310,12 +311,8 @@ export default class View implements ViewType {
); );
break; break;
case ViewTypes.KANBAN: case ViewTypes.KANBAN:
// Preset a grouping field by choosing the first single select field // set grouping field
// TODO: let users to choose in kanban create modal (view as KanbanView).grp_column_id = view.grp_column_id;
const singleSelectColumns = columns.filter(
(c) => c.uidt === UITypes.SingleSelect
)[0];
(view as KanbanView).grp_column_id = singleSelectColumns?.id;
await KanbanView.insert( await KanbanView.insert(
{ {

Loading…
Cancel
Save