Browse Source

refactor(nc-gui): remove unncessary watch & add ref to inject

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

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

@ -18,9 +18,9 @@ import {
import Row from '~/components/smartsheet/Row.vue' import Row from '~/components/smartsheet/Row.vue'
import type { Row as RowType } from '~/composables' import type { Row as RowType } from '~/composables'
const meta = inject(MetaInj) const meta = inject(MetaInj, ref())
const view = inject(ActiveViewInj) const view = inject(ActiveViewInj, ref())
const reloadViewDataHook = inject(ReloadViewDataHookInj) const reloadViewDataHook = inject(ReloadViewDataHookInj)
@ -64,17 +64,6 @@ provide(ReadonlyInj, !isUIAllowed('xcDatatableEditable'))
const fields = inject(FieldsInj, ref([])) const fields = inject(FieldsInj, ref([]))
watch(
[meta, view],
async () => {
if (meta?.value && view?.value) {
await loadKanbanMeta()
await loadKanbanData()
}
},
{ immediate: true },
)
const isRowEmpty = (record: any, col: any) => { const isRowEmpty = (record: any, col: any) => {
const val = record.row[col.title] const val = record.row[col.title]
if (!val) return true if (!val) return true

Loading…
Cancel
Save