Browse Source

feat(nc-gui): trigger meta reload only for kanban

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
49e186a425
  1. 10
      packages/nc-gui/components/smartsheet-column/EditOrAdd.vue

10
packages/nc-gui/components/smartsheet-column/EditOrAdd.vue

@ -5,6 +5,7 @@ import {
IsFormInj, IsFormInj,
IsKanbanInj, IsKanbanInj,
MetaInj, MetaInj,
ReloadKanbanMetaHookInj,
ReloadViewDataHookInj, ReloadViewDataHookInj,
computed, computed,
inject, inject,
@ -34,6 +35,8 @@ const isForm = inject(IsFormInj, ref(false))
const isKanban = inject(IsKanbanInj, ref(false)) const isKanban = inject(IsKanbanInj, ref(false))
const reloadKanbanMetaTrigger = inject(ReloadKanbanMetaHookInj)
const reloadDataTrigger = inject(ReloadViewDataHookInj) const reloadDataTrigger = inject(ReloadViewDataHookInj)
const advancedOptions = ref(false) const advancedOptions = ref(false)
@ -59,7 +62,12 @@ const uiTypesOptions = computed<typeof uiTypes>(() => {
const reloadMetaAndData = async () => { const reloadMetaAndData = async () => {
await getMeta(meta.value?.id as string, true) await getMeta(meta.value?.id as string, true)
reloadDataTrigger?.trigger()
if (isKanban.value) {
reloadKanbanMetaTrigger?.trigger()
} else {
reloadDataTrigger?.trigger()
}
} }
async function onSubmit() { async function onSubmit() {

Loading…
Cancel
Save