Skip to content

Commit

Permalink
fix(QPagination): make quick prev/next buttons switch same number of …
Browse files Browse the repository at this point in the history
…pages (#354)

Co-authored-by: Сергей Семёнов <svsemenov@gpmdata.ru>
  • Loading branch information
skaflock and Сергей Семёнов authored Feb 8, 2023
1 parent 3e61a77 commit 00be9a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qComponents/QPagination/src/QPagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 00be9a2

Please sign in to comment.