Skip to content

Commit

Permalink
fix(KtPagination): emit right value
Browse files Browse the repository at this point in the history
  • Loading branch information
Isokaeder committed Dec 1, 2021
1 parent 91598cb commit 56080c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
v-for="(page, index) in totalPages"
:key="index"
:class="paginatorClasses(page)"
@click="$emit('setPage', page - 1)"
@click="$emit('setPage', page)"
v-text="humanReadablePageNumber(page)"
/>
</div>
Expand All @@ -31,7 +31,7 @@ export default defineComponent<{
humanReadablePageNumber: (page: number) => page + 1,
paginatorClasses: (page: number) => ({
'kt-pagination__page-item': true,
'kt-pagination__page-item--is-active': props.currentPage + 1 === page,
'kt-pagination__page-item--is-active': props.currentPage === page,
}),
totalPages: computed(() => range(pageAmount.value)),
}
Expand Down

0 comments on commit 56080c1

Please sign in to comment.