From a4a5c2d6bcfbaee304b3e5038a1e3c3d0f516c3c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 30 Sep 2022 23:35:05 +0530 Subject: [PATCH] refactor(gui): bring back missing code Signed-off-by: Pranav C --- .../nc-gui/components/smartsheet/Gallery.vue | 7 +++--- .../nc-gui/components/smartsheet/Grid.vue | 22 +++++++++---------- .../components/smartsheet/sidebar/MenuTop.vue | 7 ++---- .../smartsheet/toolbar/FieldsMenu.vue | 2 +- .../index/[type]/[title]/[[viewTitle]].vue | 12 +--------- .../[projectType]/form/[viewId]/index.vue | 1 - 6 files changed, 19 insertions(+), 32 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue index 7a6726efc6..fc9a2a2903 100644 --- a/packages/nc-gui/components/smartsheet/Gallery.vue +++ b/packages/nc-gui/components/smartsheet/Gallery.vue @@ -160,9 +160,10 @@ onMounted(async () => { // provide view data reload hook as fallback to row data reload provide(ReloadRowDataHookInj, reloadViewDataHook) -watch(view, (nextView) => { - if (nextView?.type === ViewTypes.FORM) { - reloadEventHook.trigger() +watch(view, async (nextView) => { + if (nextView?.type === ViewTypes.GALLERY) { + await loadData() + await loadGalleryData() } }) diff --git a/packages/nc-gui/components/smartsheet/Grid.vue b/packages/nc-gui/components/smartsheet/Grid.vue index b4541a04a0..9665547b5f 100644 --- a/packages/nc-gui/components/smartsheet/Grid.vue +++ b/packages/nc-gui/components/smartsheet/Grid.vue @@ -230,6 +230,7 @@ useEventListener(document, 'keyup', async (e: KeyboardEvent) => { /** On clicking outside of table reset active cell */ const smartTable = ref(null) onClickOutside(smartTable, () => { + clearRangeRows() if (selected.col === null) return const activeCol = fields.value[selected.col] @@ -411,7 +412,8 @@ watch( - + +