PaginatedCollection<T, R>
Extends
Collection<T>
Type Parameters
| Type Parameter | Default type |
|---|---|
T | any |
R | any |
Constructors
Constructor
new PaginatedCollection<T, R>(options): PaginatedCollection<T, R>;
Parameters
| Parameter | Type |
|---|---|
options | PaginatedCollectionOptions<T, R> |
Returns
PaginatedCollection<T, R>
Overrides
Properties
| Property | Modifier | Type |
|---|---|---|
hasMore | public | boolean |
Accessors
failed
Inherited from
items
Inherited from
loading
Inherited from
Methods
asSearchResult()
asSearchResult(options): PaginatedSearchResult<T>;
Parameters
| Parameter | Type |
|---|---|
options | AsSearchResultOptions<T> |
Returns
clear()
clear(): void;
Returns
void
Overrides
getData()
getData(res): T[];
Parameters
| Parameter | Type |
|---|---|
res | R |
Returns
T[]
load()
load(loader): Promise<T[]>;
Parameters
| Parameter | Type |
|---|---|
loader | (event) => Promise<T[]> |
Returns
Promise<T[]>
Inherited from
loadAll()
loadAll(load?, options?): Promise<any>;
Parameters
| Parameter | Type |
|---|---|
load? | () => | AsyncIterator<R, any, any> | Promise<AsyncIterator<R, any, any>> |
options? | { abort: AbortController; } |
options.abort? | AbortController |
Returns
Promise<any>
loadInitialData()
loadInitialData(load?): Promise<boolean>;
Parameters
| Parameter | Type |
|---|---|
load? | () => | AsyncIterator<R, any, any> | Promise<AsyncIterator<R, any, any>> |
Returns
Promise<boolean>
loadMore()
loadMore(): Promise<boolean>;
Returns
Promise<boolean>