Class: Pagination<ReturnType>
Type parameters
Name |
---|
ReturnType |
Methods
first
▸ first(): Promise
<PaginationState
<ReturnType
>>
Jumps to the first page of the pagination.
Returns
Promise
<PaginationState
<ReturnType
>>
last
▸ last(): Promise
<PaginationState
<ReturnType
>>
Jumps to the last page of the pagination. This page will always have the last pageSize
elements of the
underlying query, regardless of whether the total document count is evenly divisible by the page size.
Returns
Promise
<PaginationState
<ReturnType
>>
next
▸ next(): Promise
<PaginationState
<ReturnType
>>
Returns a promise that resolves when the next page of data is available.
Returns
Promise
<PaginationState
<ReturnType
>>
observeState
▸ observeState(): Observable
<PaginationState
<ReturnType
>>
Returns an observable that emits the current state of the pagination.
Returns
Observable
<PaginationState
<ReturnType
>>
prev
▸ prev(): Promise
<PaginationState
<ReturnType
>>
Returns a promise that resolves when the previous page of data is available.
Returns
Promise
<PaginationState
<ReturnType
>>
prevInternal
▸ prevInternal(internalState
): void
Parameters
Name | Type |
---|---|
internalState | InternalState <ReturnType > |
Returns
void
refreshPage
▸ refreshPage(): Promise
<PaginationState
<ReturnType
>>
Refreshes the current page of the pagination.
Returns
Promise
<PaginationState
<ReturnType
>>
unsubscribe
▸ unsubscribe(): void
Unsubscribes from the pagination.
Returns
void
waitForData
▸ waitForData(): Promise
<PaginationState
<ReturnType
>>
Returns a promise that resolves when the page data is available.
Returns
Promise
<PaginationState
<ReturnType
>>