diff --git a/packages/nc-gui/components/smartsheet/header/Menu.vue b/packages/nc-gui/components/smartsheet/header/Menu.vue index 2eafc4950b..d3c2728418 100644 --- a/packages/nc-gui/components/smartsheet/header/Menu.vue +++ b/packages/nc-gui/components/smartsheet/header/Menu.vue @@ -179,10 +179,20 @@ const addColumn = async (before = false) => { }, }) } + +const hideField = async () => { + const gridViewColumnList = await $api.dbViewColumn.list(view.value?.id as string) + + const currentColumn = gridViewColumnList.find((f) => f.fk_column_id === column!.value.id) + + await $api.dbViewColumn.update(view.value.id, currentColumn.id, { show: false }) + eventBus.emit(SmartsheetStoreEvents.FIELD_RELOAD) +}