From 0d27467f717a5ba89a4603a834837a81477adacd Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 12 Oct 2022 15:01:15 +0200 Subject: [PATCH] fix(nc-gui): remove `useMetas` from watch cb --- packages/nc-gui/components/smartsheet/Grid.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue index 07f529ac6e..37ce4416e7 100644 --- a/packages/nc-gui/components/smartsheet/Grid.vue +++ b/packages/nc-gui/components/smartsheet/Grid.vue @@ -14,12 +14,15 @@ import { OpenNewRecordFormHookInj, PaginationDataInj, ReadonlyInj, + ReloadRowDataHookInj, ReloadViewDataHookInj, + computed, createEventHook, extractPkFromRow, inject, isColumnRequiredAndNull, message, + onBeforeUnmount, onClickOutside, onMounted, provide, @@ -27,6 +30,7 @@ import { useEventListener, useGridViewColumnWidth, useI18n, + useMetas, useMultiSelect, useRoute, useSmartsheetStoreOrThrow, @@ -98,6 +102,8 @@ const { removeRowIfNew, } = useViewData(meta, view, xWhere) +const { getMeta } = useMetas() + const { loadGridViewColumns, updateWidth, resizingColWidth, resizingCol } = useGridViewColumnWidth(view) const { selectCell, selectBlock, selectedRange, clearRangeRows, startSelectRange, selected } = useMultiSelect( @@ -336,7 +342,6 @@ watch( if (next && next.id !== old?.id) { // whenever tab changes or view changes save any unsaved data if (old?.id) { - const { getMeta } = useMetas() const oldMeta = await getMeta(old.fk_model_id!) if (oldMeta) { await saveOrUpdateRecords({