From e1b59fe3e4a87a270f2bde20f629b7e74689e4a7 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 5 Sep 2022 15:07:40 +0800 Subject: [PATCH] fix(gui-v2): revise watch in useViewColumn --- packages/nc-gui-v2/composables/useViewColumns.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui-v2/composables/useViewColumns.ts b/packages/nc-gui-v2/composables/useViewColumns.ts index 827ad0f909..b338d44b62 100644 --- a/packages/nc-gui-v2/composables/useViewColumns.ts +++ b/packages/nc-gui-v2/composables/useViewColumns.ts @@ -202,11 +202,14 @@ export function useViewColumns(view: Ref | 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,