Classcorev0.4.1
CursorSourceBase
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 CursorSourceBase<Item, Ctx> implements PageSourceBase<Item, Ctx>Member visibility
Filter class members by access level.
CursorSourceBase(
fetch: (
ctx: Ctx,
page: number,
perPage: number
) => Promisable<{
items: readonly Item[];
hasNext: boolean;
}>,
opts?: { perPage?: number }
)Showing members with Protected visibility and higher.