From ea2c326b5c2691c32f83f8535e1c179ae448f14c Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 12 Nov 2024 08:02:28 +0000 Subject: [PATCH] fix: scroll issue --- packages/nc-gui/components/smartsheet/Gallery.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue index 48fef40197..1b83ffe210 100644 --- a/packages/nc-gui/components/smartsheet/Gallery.vue +++ b/packages/nc-gui/components/smartsheet/Gallery.vue @@ -330,8 +330,12 @@ const placeholderAboveHeight = computed(() => { const visibleRowStart = Math.floor(scrollTop.value / (cardHeight.value + 12)) const startRecordIndex = Math.max(0, visibleRowStart - 2) + const placeholderHeight = startRecordIndex * (cardHeight.value + 12) - return startRecordIndex * (cardHeight.value + 12) + if (placeholderHeight > containerHeight.value) { + return containerHeight.value - cardHeight.value + } + return placeholderHeight }) const { width, height } = useWindowSize()