Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPagination: "Next" link navigates to "Last" #3008

Open
MokhaDesign opened this issue Jan 3, 2025 · 0 comments
Open

UPagination: "Next" link navigates to "Last" #3008

MokhaDesign opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working triage v3 #1289

Comments

@MokhaDesign
Copy link

Environment

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.15.0

Reproduction

https://codesandbox.io/p/devbox/nuxt-ui3-forked-87nr2y

Description

This is pretty cut and dry. The current link generated for "Next" is the same as "Last":

      <PaginationNext v-if="showControls || !!slots.next" as-child>
        <slot name="next">
          <UButton :color="color" :variant="variant" :size="size" :icon="nextIcon" :to="page < pageCount ? to?.(pageCount) : undefined" />
        </slot>
      </PaginationNext>
      <PaginationLast v-if="showControls || !!slots.last" as-child>
        <slot name="last">
          <UButton :color="color" :variant="variant" :size="size" :icon="lastIcon" :to=" to?.(pageCount)" />
        </slot>
      </PaginationLast>

A change as simple as :to="page < pageCount ? to?.(page + 1) : undefined is all the love it needs.

(I've never been involved with GitHub much, so please forgive me for not PR'ing or getting anything wrong in this bug report.)

Additional context

No response

Logs

@MokhaDesign MokhaDesign added bug Something isn't working triage v3 #1289 labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant