β¬ οΈ Back to Table of Contents
π useOffsetPagination¶
π Analysis Summary¶
| Metric | Count |
|---|---|
| π§ Functions | 3 |
| π¦ Imports | 14 |
| π’ Vue Composition API | 9 |
| π Interfaces | 2 |
| π Type Aliases | 1 |
π Table of Contents¶
π οΈ File Location:¶
π packages/core/useOffsetPagination/index.ts
π¦ Imports¶
| Name | Source |
|---|---|
ComputedRef |
vue |
MaybeRef |
vue |
MaybeRefOrGetter |
vue |
Ref |
vue |
UnwrapNestedRefs |
vue |
noop |
@vueuse/shared |
syncRef |
@vueuse/shared |
computed |
vue |
isReadonly |
vue |
isRef |
vue |
reactive |
vue |
toValue |
vue |
watch |
vue |
useClamp |
../../math/useClamp |
Vue Composition API¶
| Name | Type | Reactive Variables | Composables |
|---|---|---|---|
computed |
computed | none | none |
computed |
computed | none | none |
computed |
computed | none | none |
watch |
watch | none | none |
reactive |
reactive | none | none |
watch |
watch | none | none |
reactive |
reactive | none | none |
watch |
watch | none | none |
reactive |
reactive | none | none |
Functions¶
useOffsetPagination(options: Omit<UseOffsetPaginationOptions, 'totalβ¦): UseOffsetPaginationInfinityPageReturn¶
Parameters:
optionsOmit<UseOffsetPaginationOptions, 'total'>
Returns: UseOffsetPaginationInfinityPageReturn
Code
Internal helpers¶
Declared inside another function in this file.
prev(): void¶
Returns: void
next(): void¶
Returns: void
Interfaces¶
UseOffsetPaginationOptions¶
Interface Code
export interface UseOffsetPaginationOptions {
/**
* Total number of items.
*/
total?: MaybeRefOrGetter<number>
/**
* The number of items to display per page.
* @default 10
*/
pageSize?: MaybeRefOrGetter<number>
/**
* The current page number.
* @default 1
*/
page?: MaybeRef<number>
/**
* Callback when the `page` change.
*/
onPageChange?: (returnValue: UnwrapNestedRefs<UseOffsetPaginationReturn>) => unknown
/**
* Callback when the `pageSize` change.
*/
onPageSizeChange?: (returnValue: UnwrapNestedRefs<UseOffsetPaginationReturn>) => unknown
/**
* Callback when the `pageCount` change.
*/
onPageCountChange?: (returnValue: UnwrapNestedRefs<UseOffsetPaginationReturn>) => unknown
}
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
total |
MaybeRefOrGetter<number> |
β | not shown |
pageSize |
MaybeRefOrGetter<number> |
β | not shown |
page |
MaybeRef<number> |
β | not shown |
onPageChange |
(returnValue: UnwrapNestedRefs<UseOffsetPaginationReturn>) => unknown |
β | not shown |
onPageSizeChange |
(returnValue: UnwrapNestedRefs<UseOffsetPaginationReturn>) => unknown |
β | not shown |
onPageCountChange |
(returnValue: UnwrapNestedRefs<UseOffsetPaginationReturn>) => unknown |
β | not shown |
UseOffsetPaginationReturn¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
currentPage |
Ref<number> |
β | not shown |
currentPageSize |
Ref<number> |
β | not shown |
pageCount |
ComputedRef<number> |
β | not shown |
isFirstPage |
ComputedRef<boolean> |
β | not shown |
isLastPage |
ComputedRef<boolean> |
β | not shown |
prev |
() => void |
β | not shown |
next |
() => void |
β | not shown |
Type Aliases¶
UseOffsetPaginationInfinityPageReturn¶
Generated by Syntax Scribe