From 27f621033609cf005e0b28dcc7c003444d945306 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 20 Feb 2024 07:16:17 +0000 Subject: [PATCH] fix(nc-gui): low viewport fix --- .../smartsheet/calendar/SideMenu.vue | 85 ++++++++++++------- 1 file changed, 56 insertions(+), 29 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue b/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue index 6abc72aeb9..c6ed309847 100644 --- a/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue +++ b/packages/nc-gui/components/smartsheet/calendar/SideMenu.vue @@ -248,42 +248,68 @@ const sideBarListScrollHandle = useDebounceFn(async (e: Event) => { }) } }) + +const height = ref(0) + +const heightListener = () => { + height.value = window.innerHeight +} + +onMounted(() => { + window.addEventListener('resize', heightListener) +}) + +onUnmounted(() => { + window.removeEventListener('resize', heightListener) +})