Skip to content
Classhttpv0.10.2

ArraySource

A source for a bounded list you can load whole. It loads the full list on every click, then slices the page, 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> extends ArraySourceBase<Item, PageContext>

Member visibility

Filter class members by access level.

constructor

Constructs a new instance of the ArraySourceBase class

ArraySourceBase(
    load: (ctx: Ctx) => Promisable<readonly Item[]>,
    opts?: { perPage?: number }
)

Inherited from:ArraySourceBase

Showing members with Protected visibility and higher.

Methods

Item

The item type, inferred from the loader's return.

Item