From 00be9a2453fe671d40025e0dcda3c9ed04cd3032 Mon Sep 17 00:00:00 2001 From: Sergei Semenov Date: Wed, 8 Feb 2023 11:26:00 +0300 Subject: [PATCH] fix(QPagination): make quick prev/next buttons switch same number of pages (#354) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Сергей Семёнов --- src/qComponents/QPagination/src/QPagination.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qComponents/QPagination/src/QPagination.vue b/src/qComponents/QPagination/src/QPagination.vue index 78896760..9ec32ab9 100644 --- a/src/qComponents/QPagination/src/QPagination.vue +++ b/src/qComponents/QPagination/src/QPagination.vue @@ -222,7 +222,7 @@ export default defineComponent({ }; const handlePrevQuickBtnClick = (): void => { - let newPage = props.currentPage - props.pagerCount - 2; + let newPage = props.currentPage - (props.pagerCount - 2); if (newPage > preparedPageCount.value) newPage = preparedPageCount.value; else if (newPage < 1) newPage = 1; @@ -231,7 +231,7 @@ export default defineComponent({ }; const handleNextQuickBtnClick = (): void => { - let newPage = props.currentPage + props.pagerCount - 2; + let newPage = props.currentPage + (props.pagerCount - 2); if (newPage > preparedPageCount.value) newPage = preparedPageCount.value; else if (newPage < 1) newPage = 1;