From 7590fd9d0d0791614a4bce05bc630ed39feaad6a Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:57:26 +0000 Subject: [PATCH] fix: show newly added column in same view & hide from all other views --- packages/nc-gui/components/smartsheet/details/Fields.vue | 2 ++ packages/nocodb/src/models/View.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/packages/nc-gui/components/smartsheet/details/Fields.vue b/packages/nc-gui/components/smartsheet/details/Fields.vue index 27815e7806..284fc181e0 100644 --- a/packages/nc-gui/components/smartsheet/details/Fields.vue +++ b/packages/nc-gui/components/smartsheet/details/Fields.vue @@ -14,6 +14,7 @@ interface TableExplorerColumn extends ColumnType { order: number view_id: string } + view_id?: string } interface op { @@ -355,6 +356,7 @@ const onFieldAdd = (state: TableExplorerColumn) => { } state.temp_id = `temp_${++temporaryAddCount.value}` + state.view_id = view.value?.id as string ops.value.push({ op: 'add', column: state, diff --git a/packages/nocodb/src/models/View.ts b/packages/nocodb/src/models/View.ts index dccddc4102..cade561475 100644 --- a/packages/nocodb/src/models/View.ts +++ b/packages/nocodb/src/models/View.ts @@ -583,6 +583,9 @@ export default class View implements ViewType { ncMeta, ); break; + case ViewTypes.FORM: + await FormViewColumn.insert(modifiedInsertObj, ncMeta); + break; } } }