From 0c2d9e6ec60775f23fdea36b6131fb8753127eb5 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 18 Oct 2024 10:08:46 +0200 Subject: [PATCH] fix: refs #7353 load on scroll end 80% zoom --- src/components/VnTable/VnTable.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 05bc6edeb..5239fe859 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -325,7 +325,8 @@ function handleOnDataSaved(_) { function handleScroll() { const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); - const isAtBottom = tMiddle.scrollHeight - tMiddle.scrollTop === tMiddle.clientHeight; + const { scrollHeight, scrollTop, clientHeight } = tMiddle; + const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40; if (isAtBottom) CrudModelRef.value.vnPaginateRef.paginate(); }