diff --git a/packages/nc-gui-v2/components/smartsheet/Sidebar.vue b/packages/nc-gui-v2/components/smartsheet/Sidebar.vue index b97bf86063..aef8234608 100644 --- a/packages/nc-gui-v2/components/smartsheet/Sidebar.vue +++ b/packages/nc-gui-v2/components/smartsheet/Sidebar.vue @@ -32,12 +32,12 @@ let viewCreateType = $ref() let viewCreateDlg = $ref(false) -const openCreateViewDlg = (type: ViewTypes) => { +function openCreateViewDlg(type: ViewTypes) { viewCreateDlg = true viewCreateType = type } -const onViewCreate = (view: GridType | FormType | KanbanType | GalleryType) => { +function onViewCreate(view: GridType | FormType | KanbanType | GalleryType) { views.value?.push(view) activeView.value = view viewCreateDlg = false @@ -45,35 +45,14 @@ const onViewCreate = (view: GridType | FormType | KanbanType | GalleryType) => { @@ -279,5 +155,5 @@ const onViewCreate = (view: GridType | FormType | KanbanType | GalleryType) => { - + diff --git a/packages/nc-gui-v2/context/index.ts b/packages/nc-gui-v2/context/index.ts index 9c7c0da7d0..7bd74a78f6 100644 --- a/packages/nc-gui-v2/context/index.ts +++ b/packages/nc-gui-v2/context/index.ts @@ -1,4 +1,4 @@ -import type { ColumnType, TableType, ViewType } from 'nocodb-sdk' +import type { ColumnType, FormType, GalleryType, GridType, KanbanType, TableType, ViewType } from 'nocodb-sdk' import type { ComputedRef, InjectionKey, Ref } from 'vue' import type { EventHook } from '@vueuse/core' import type { useViewData } from '#imports' @@ -14,7 +14,7 @@ export const IsFormInj: InjectionKey = Symbol('is-form-injection') export const IsGridInj: InjectionKey = Symbol('is-grid-injection') export const IsLockedInj: InjectionKey = Symbol('is-locked-injection') export const ValueInj: InjectionKey = Symbol('value-injection') -export const ActiveViewInj: InjectionKey> = Symbol('active-view-injection') +export const ActiveViewInj: InjectionKey> = Symbol('active-view-injection') export const ReadonlyInj: InjectionKey = Symbol('readonly-injection') export const ReloadViewDataHookInj: InjectionKey> = Symbol('reload-view-data-injection') export const FieldsInj: InjectionKey> = Symbol('fields-injection')