Browse Source

feat(nc-gui): reload kanban data after save

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
0e7091caad
  1. 11
      packages/nc-gui/composables/useExpandedFormStore.ts

11
packages/nc-gui/composables/useExpandedFormStore.ts

@ -1,4 +1,4 @@
import { UITypes } from 'nocodb-sdk' import { UITypes, ViewTypes } from 'nocodb-sdk'
import type { ColumnType, TableType } from 'nocodb-sdk' import type { ColumnType, TableType } from 'nocodb-sdk'
import type { Ref } from 'vue' import type { Ref } from 'vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
@ -11,6 +11,7 @@ import {
getHTMLEncodedText, getHTMLEncodedText,
useApi, useApi,
useInjectionState, useInjectionState,
useKanbanViewData,
useNuxtApp, useNuxtApp,
useProject, useProject,
useProvideSmartsheetRowStore, useProvideSmartsheetRowStore,
@ -29,8 +30,8 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
const changedColumns = ref(new Set<string>()) const changedColumns = ref(new Set<string>())
const { project } = useProject() const { project } = useProject()
const rowStore = useProvideSmartsheetRowStore(meta, row) const rowStore = useProvideSmartsheetRowStore(meta, row)
// todo const activeView = inject(ActiveViewInj)
// const activeView = inject(ActiveViewInj) const { loadKanbanData } = useKanbanViewData(meta, activeView as any)
// const { updateOrSaveRow, insertRow } = useViewData(meta, activeView as any) // const { updateOrSaveRow, insertRow } = useViewData(meta, activeView as any)
@ -159,6 +160,10 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m
return message.info(t('msg.info.noColumnsToUpdate')) return message.info(t('msg.info.noColumnsToUpdate'))
} }
if (activeView?.value.type === ViewTypes.KANBAN) {
await loadKanbanData()
}
// this.$emit('update:oldRow', { ...this.localState }); // this.$emit('update:oldRow', { ...this.localState });
// this.changedColumns = {}; // this.changedColumns = {};
// this.$emit('input', this.localState); // this.$emit('input', this.localState);

Loading…
Cancel
Save