From 297f6c1797d965fc1f77418422146c0b29927a5c Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 16 Jan 2022 01:03:22 +0100 Subject: [PATCH] =?UTF-8?q?Poprawki=20dzia=C5=82ania=20paginacji?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TrainsView/TrainTable.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue index 5898e8e..e075004 100644 --- a/src/components/TrainsView/TrainTable.vue +++ b/src/components/TrainsView/TrainTable.vue @@ -297,7 +297,8 @@ export default defineComponent({ }); watch(paginatorPageCount, (value) => { - if (currentPage.value >= value) currentPage.value = paginatorPageCount.value - 1; + if (currentPage.value >= value) + currentPage.value = paginatorPageCount.value - 1 < 0 ? 0 : paginatorPageCount.value - 1; }); return {