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

Pagination do not work correctly if I set page not in range of sibling-count #957

Open
hieuNV0871 opened this issue Dec 12, 2024 · 0 comments

Comments

@hieuNV0871
Copy link

<Pagination v-model:page="queries.page" :total="list_order?.total" :itemsPerPage="queries.limit" :sibling-count="1" show-edges :default-page="defaultParams.page"> <PaginationList v-slot="{ items }" class="flex items-center gap-1"> <template v-for="(item, index) in items"> <PaginationListItem v-if="item.type === 'page'" :key="index" :value="item.value" as-child> <Button class="primary_customer w-7" :variant="item.value == queries.page ? 'default' : 'outline'"> {{ item.value }} </Button> </PaginationListItem> <PaginationEllipsis v-else :key="item.type" :index="index" /> </template> </PaginationList> </Pagination>

const queries = ref({page: route.query.page ?? 1, limit: route.query.limit})

  1. if the pagination list is <= 1 2 3 4 5... 21 =>
  2. When i type "?page=6&limit=20" (6 not in viewport pagination list) in URL, the pagination update to <= 1 ... 17 18 19 20 21=> not include 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant