Skip to content

Commit

Permalink
fix(Pagination): use links on prev and next button (nuxt#2179)
Browse files Browse the repository at this point in the history
  • Loading branch information
noook authored and binhth-1206 committed Sep 14, 2024
1 parent 7414901 commit a7b8bab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/components/navigation/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<UButton
v-if="firstButton && showFirst"
:size="size"
:to="to?.(1)"
:disabled="!canGoFirstOrPrev || disabled"
:class="[ui.base, ui.rounded]"
v-bind="{ ...(ui.default.firstButton || {}), ...firstButton }"
Expand All @@ -17,6 +18,7 @@
<UButton
v-if="prevButton"
:size="size"
:to="to?.(currentPage - 1)"
:disabled="!canGoFirstOrPrev || disabled"
:class="[ui.base, ui.rounded]"
v-bind="{ ...(ui.default.prevButton || {}), ...prevButton }"
Expand All @@ -43,6 +45,7 @@
<UButton
v-if="nextButton"
:size="size"
:to="to?.(currentPage + 1)"
:disabled="!canGoLastOrNext || disabled"
:class="[ui.base, ui.rounded]"
v-bind="{ ...(ui.default.nextButton || {}), ...nextButton }"
Expand All @@ -56,6 +59,7 @@
<UButton
v-if="lastButton && showLast"
:size="size"
:to="to?.(pages.length)"
:disabled="!canGoLastOrNext || disabled"
:class="[ui.base, ui.rounded]"
v-bind="{ ...(ui.default.lastButton || {}), ...lastButton }"
Expand Down

0 comments on commit a7b8bab

Please sign in to comment.