From e7b431e9ec2c9745fb9b980d039d8f721093498c Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 19 Nov 2024 09:32:35 +0100 Subject: [PATCH] fix(VnPaginate): disable pagination --- src/components/ui/VnPaginate.vue | 2 ++ src/pages/Item/ItemFixedPrice.vue | 2 +- src/pages/Ticket/Card/TicketSale.vue | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index b058dc642..04a843889 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -141,6 +141,8 @@ async function fetch(params) { } async function paginate() { + if (props.disableInfiniteScroll || !store.hasMoreData) return; + const { page, rowsPerPage, sortBy, descending } = pagination.value; if (!props.url) return; diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index 815c7d519..628af681a 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -440,7 +440,7 @@ function handleOnDataSave({ CrudModelRef }) { selection: 'multiple', }" :crud-model="{ - paginate: false, + disableInfiniteScroll: true, }" v-model:selected="rowsSelected" :row-click="saveOnRowChange" diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 1b9791529..08cf248ba 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -621,7 +621,7 @@ watch( }" :create-as-dialog="false" :crud-model="{ - paginate: false, + disableInfiniteScroll: true, }" :default-remove="false" :default-reset="false"