From 6348f475aaebc9283f446dff27b977966fa55af8 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Tue, 26 Sep 2023 15:25:07 +0000 Subject: [PATCH] fix: Integrated pagination changes to grid --- packages/nc-gui/components/nc/Pagination.vue | 48 +++++++++++++++++-- .../components/smartsheet/Pagination.vue | 4 +- .../components/smartsheet/grid/Table.vue | 4 +- .../components/smartsheet/grid/index.vue | 2 +- .../playwright/pages/Dashboard/Grid/index.ts | 43 +++++------------ .../pages/Dashboard/common/Footbar/index.ts | 4 +- tests/playwright/quickTests/commonTest.ts | 10 ++-- .../tests/db/features/pagination.spec.ts | 8 ++-- 8 files changed, 74 insertions(+), 49 deletions(-) diff --git a/packages/nc-gui/components/nc/Pagination.vue b/packages/nc-gui/components/nc/Pagination.vue index dbaa822d56..1d17e4dc1c 100644 --- a/packages/nc-gui/components/nc/Pagination.vue +++ b/packages/nc-gui/components/nc/Pagination.vue @@ -24,17 +24,59 @@ const changePage = ({ increase }: { increase: boolean }) => { current.value = current.value - 1 } } + +const goToLastPage = () => { + current.value = totalPages.value +} + +const goToFirstPage = () => { + current.value = 1 +} diff --git a/packages/nc-gui/components/smartsheet/Pagination.vue b/packages/nc-gui/components/smartsheet/Pagination.vue index 9715b322f3..62e7d7cc33 100644 --- a/packages/nc-gui/components/smartsheet/Pagination.vue +++ b/packages/nc-gui/components/smartsheet/Pagination.vue @@ -60,7 +60,7 @@ const isRTLLanguage = computed(() => isRtlLang(locale.value as keyof typeof Lang