Browse Source

feat(nc-gui): add ReloadKanbanMetaHookInj

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
460444e2e4
  1. 3
      packages/nc-gui/components/tabs/Smartsheet.vue
  2. 1
      packages/nc-gui/context/index.ts

3
packages/nc-gui/components/tabs/Smartsheet.vue

@ -8,6 +8,7 @@ import {
IsLockedInj,
MetaInj,
OpenNewRecordFormHookInj,
ReloadKanbanMetaHookInj,
ReloadViewDataHookInj,
computed,
inject,
@ -36,6 +37,7 @@ const meta = computed<TableType>(() => metas.value?.[activeTab?.id as string])
const reloadEventHook = createEventHook<void>()
const openNewRecordFormHook = createEventHook<void>()
const reloadKanbanMetaHook = createEventHook<void>()
const { isGallery, isGrid, isForm, isKanban, isLocked } = useProvideSmartsheetStore(activeView, meta)
@ -47,6 +49,7 @@ provide(MetaInj, meta)
provide(ActiveViewInj, activeView)
provide(IsLockedInj, isLocked)
provide(ReloadViewDataHookInj, reloadEventHook)
provide(ReloadKanbanMetaHookInj, reloadKanbanMetaHook)
provide(OpenNewRecordFormHookInj, openNewRecordFormHook)
provide(FieldsInj, fields)
provide(IsFormInj, isForm)

1
packages/nc-gui/context/index.ts

@ -23,6 +23,7 @@ export const CellValueInj: InjectionKey<Ref<any>> = Symbol('cell-value-injection
export const ActiveViewInj: InjectionKey<Ref<ViewType>> = Symbol('active-view-injection')
export const ReadonlyInj: InjectionKey<boolean> = Symbol('readonly-injection')
export const ReloadViewDataHookInj: InjectionKey<EventHook<void>> = Symbol('reload-view-data-injection')
export const ReloadKanbanMetaHookInj: InjectionKey<EventHook<void>> = Symbol('reload-kanban-meta-injection')
export const ReloadRowDataHookInj: InjectionKey<EventHook<void>> = Symbol('reload-row-data-injection')
export const OpenNewRecordFormHookInj: InjectionKey<EventHook<void>> = Symbol('open-new-record-form-injection')
export const FieldsInj: InjectionKey<Ref<any[]>> = Symbol('fields-injection')

Loading…
Cancel
Save