Browse Source

fix: show newly added column in same view & hide from all other views

pull/7696/head
Ramesh Mane 9 months ago
parent
commit
7590fd9d0d
  1. 2
      packages/nc-gui/components/smartsheet/details/Fields.vue
  2. 3
      packages/nocodb/src/models/View.ts

2
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -14,6 +14,7 @@ interface TableExplorerColumn extends ColumnType {
order: number order: number
view_id: string view_id: string
} }
view_id?: string
} }
interface op { interface op {
@ -355,6 +356,7 @@ const onFieldAdd = (state: TableExplorerColumn) => {
} }
state.temp_id = `temp_${++temporaryAddCount.value}` state.temp_id = `temp_${++temporaryAddCount.value}`
state.view_id = view.value?.id as string
ops.value.push({ ops.value.push({
op: 'add', op: 'add',
column: state, column: state,

3
packages/nocodb/src/models/View.ts

@ -583,6 +583,9 @@ export default class View implements ViewType {
ncMeta, ncMeta,
); );
break; break;
case ViewTypes.FORM:
await FormViewColumn.insert(modifiedInsertObj, ncMeta);
break;
} }
} }
} }

Loading…
Cancel
Save