From a1e06f107463ea5ab8fc4c1a2eda0841339539f8 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 26 Oct 2023 17:05:38 +0000 Subject: [PATCH 01/13] fix: Added auto scrolling/auto hiding of create view btn in sidebar --- .../nc-gui/components/dashboard/Sidebar.vue | 10 ++- .../dashboard/TreeView/ProjectNode.vue | 12 +++- .../dashboard/TreeView/TableList.vue | 9 +++ .../dashboard/TreeView/TableNode.vue | 21 +++++- .../dashboard/TreeView/ViewsList.vue | 71 ++++++++++++++----- .../components/dashboard/TreeView/index.vue | 10 ++- 6 files changed, 108 insertions(+), 25 deletions(-) diff --git a/packages/nc-gui/components/dashboard/Sidebar.vue b/packages/nc-gui/components/dashboard/Sidebar.vue index 2b2c9a6551..ad3af0e9cf 100644 --- a/packages/nc-gui/components/dashboard/Sidebar.vue +++ b/packages/nc-gui/components/dashboard/Sidebar.vue @@ -31,6 +31,14 @@ onMounted(() => { onUnmounted(() => { treeViewDom.value?.removeEventListener('scroll', checkScrollTopMoreThanZero) }) + +const onOpenTable = (scrollDown: boolean) => { + if (scrollDown && treeViewDom.value && !isMobileMode.value) { + nextTick(() => { + treeViewDom.value!.scrollTop = treeViewDom.value!.scrollTop - 8 + }) + } +}