Browse Source

feat(nc-gui): load kanban meta on reloadKanbanMetaHook

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
a36fa13196
  1. 8
      packages/nc-gui/components/smartsheet/Kanban.vue

8
packages/nc-gui/components/smartsheet/Kanban.vue

@ -24,6 +24,8 @@ const view = inject(ActiveViewInj, ref())
const reloadViewDataHook = inject(ReloadViewDataHookInj) const reloadViewDataHook = inject(ReloadViewDataHookInj)
const reloadKanbanMetaHook = inject(ReloadKanbanMetaHookInj)
const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook()) const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook())
const expandedFormDlg = ref(false) const expandedFormDlg = ref(false)
@ -50,7 +52,7 @@ const {
groupingField, groupingField,
countByStack, countByStack,
deleteStack, deleteStack,
} = useKanbanViewData(meta, view as any) } = useKanbanViewData(meta, view)
const { isUIAllowed } = useUIPermission() const { isUIAllowed } = useUIPermission()
@ -76,6 +78,10 @@ reloadViewDataHook?.on(async () => {
await loadKanbanData() await loadKanbanData()
}) })
reloadKanbanMetaHook?.on(async () => {
await loadKanbanMeta()
})
const expandForm = (row: RowType, state?: Record<string, any>) => { const expandForm = (row: RowType, state?: Record<string, any>) => {
if (!isUIAllowed('xcDatatableEditable')) return if (!isUIAllowed('xcDatatableEditable')) return
expandedFormRow.value = row expandedFormRow.value = row

Loading…
Cancel
Save