Browse Source

fix(gui-v2): revise watch in useViewColumn

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

13
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
watch(meta, async (newVal, oldVal) => {
if (newVal !== oldVal && meta.value) {
await loadViewColumns()
}
})
watch(
() => meta,
async (newVal, oldVal) => {
if (newVal !== oldVal && meta.value) {
await loadViewColumns()
}
},
)
return {
fields,

Loading…
Cancel
Save