Browse Source

fix(gui-v2): revise watch in useViewColumn

pull/3492/head
Wing-Kam Wong 2 years ago
parent
commit
e1b59fe3e4
  1. 7
      packages/nc-gui-v2/composables/useViewColumns.ts

7
packages/nc-gui-v2/composables/useViewColumns.ts

@ -202,11 +202,14 @@ export function useViewColumns(view: Ref<ViewType> | undefined, meta: ComputedRe
}) })
// reload view columns when table meta changes // reload view columns when table meta changes
watch(meta, async (newVal, oldVal) => { watch(
() => meta,
async (newVal, oldVal) => {
if (newVal !== oldVal && meta.value) { if (newVal !== oldVal && meta.value) {
await loadViewColumns() await loadViewColumns()
} }
}) },
)
return { return {
fields, fields,

Loading…
Cancel
Save