Classseedcordv0.15.0
ArraySource
A source for a bounded list you can load whole. It loads the full list on every click, then slices the page via paginatepaginate, so the real total is known (a real last button, "Page X of Y"). Cache inside your loader if the load is expensive.
class ArraySource<Item> implements PageSource<Item>class ArraySource<Item> implements PageSource<Item>Member visibility
Filter class members by access level.
ArraySource(
load: (ctx: PageContext) => Promisable<readonly Item[]>,
opts?: { perPage?: number }
)ArraySource(
load: (ctx: PageContext) => Promisable<readonly Item[]>,
opts?: { perPage?: number }
)Showing members with Protected visibility and higher.
Methods
Item
The item type, inferred from the loader's return.
ItemItempublic async page(
ctx: PageContext,
n: number
): Promise<PageView<Item>>public async page(
ctx: PageContext,
n: number
): Promise<PageView<Item>>