Classgatewayv0.4.1
CursorSource
A source for a large or unknown-length set you fetch one page at a time (SQL LIMIT/OFFSET, a paged API). The fetcher receives the page index and the page size and reports whether a next page exists. A cursor source has no cheap total, so totalPages is undefined, the last button is omitted, and the indicator reads "Page X".
class CursorSource<Item> extends CursorSourceBase<Item, PageContext>Member visibility
Filter class members by access level.
constructor
Constructs a new instance of the CursorSourceBase class
CursorSourceBase(
fetch: (
ctx: Ctx,
page: number,
perPage: number
) => Promisable<{
items: readonly Item[];
hasNext: boolean;
}>,
opts?: { perPage?: number }
)Inherited from:CursorSourceBase
Showing members with Protected visibility and higher.
Methods
Item
The item type, inferred from the fetcher's slice.
Itempage()
Inherited from:CursorSourceBase