From 332e55fbcb8da17848506b9b138b30fc20c6e3a0 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sat, 25 Mar 2023 00:54:02 +0300 Subject: [PATCH] fix: shared view fields local mode Signed-off-by: mertmit --- packages/nc-gui/composables/useViewColumns.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/composables/useViewColumns.ts b/packages/nc-gui/composables/useViewColumns.ts index c71f4ef0d8..d161969c93 100644 --- a/packages/nc-gui/composables/useViewColumns.ts +++ b/packages/nc-gui/composables/useViewColumns.ts @@ -140,7 +140,7 @@ export function useViewColumns( } const saveOrUpdate = async (field: any, index: number) => { - if (isLocalMode.value && fields.value && !isUIAllowed('fieldsSync')) { + if (isLocalMode.value && fields.value) { fields.value[index] = field meta.value!.columns = meta.value!.columns?.map((column: ColumnType) => { if (column.id === field.fk_column_id) { @@ -154,10 +154,6 @@ export function useViewColumns( }) localChanges.value.push(field) - - await loadViewColumns() - reloadData?.() - return } if (isUIAllowed('fieldsSync')) { @@ -172,6 +168,7 @@ export function useViewColumns( return insertedField } } + await loadViewColumns() reloadData?.() }