Skip to content

Commit

Permalink
fix(useOffsetPagination): incorrectly currentPageSize value (#1949)
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Jul 18, 2022
1 parent 4ca7070 commit 85c5f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useOffsetPagination/index.ts
Expand Up @@ -62,7 +62,7 @@ export function useOffsetPagination(options: UseOffsetPaginationOptions): UseOff
onPageCountChange = noop,
} = options

const currentPageSize = computed(() => Math.min(unref(pageSize), 1))
const currentPageSize = useClamp(pageSize, 1, Infinity)

const pageCount = computed(() => Math.ceil((unref(total)) / unref(currentPageSize)))

Expand Down

0 comments on commit 85c5f0c

Please sign in to comment.