From 5d58bb0c139d7dd108c75736cd24325c8115a447 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 09:47:59 +0100 Subject: [PATCH] fix(VnPaginate): disable pagination --- src/components/VnTable/VnTable.vue | 2 ++ src/components/ui/VnPaginate.vue | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 908157610..da6c89cbb 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -325,6 +325,8 @@ function handleOnDataSaved(_) { } function handleScroll() { + if ($props.crudModel.disableInfiniteScroll) return; + const tMiddle = tableRef.value.$el.querySelector('.q-table__middle'); const { scrollHeight, scrollTop, clientHeight } = tMiddle; const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40; diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 04a843889..b058dc642 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -141,8 +141,6 @@ async function fetch(params) { } async function paginate() { - if (props.disableInfiniteScroll || !store.hasMoreData) return; - const { page, rowsPerPage, sortBy, descending } = pagination.value; if (!props.url) return;