Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

InfiniteListLoaderOptions

InfiniteListLoaderOptions<T>: { id: string; limit?: number; loadPage: (params: ListParams) => Promise<ListResponse<T>>; store: ItemStore<T> }

Type parameters

  • T

Type declaration

  • id: string

    A name for the loader, for use in debugging

  • Optional limit?: number

    Number of items to load per-page. This is passed to the loadPage function, and is used internally to know if there are any more items to load

  • loadPage: (params: ListParams) => Promise<ListResponse<T>>

    The function which loads a single page of items.

    If the returned object has lastKey, the list will pass that lastKey to the function again on the next loadMore() call to fetch more items. If lastKey is undefined, the list will stop fetching items

  • store: ItemStore<T>

    The store in which to load items

ListParams

ListParams: { lastKey?: string; limit: number }

Params sent to list endpoints

Type declaration

  • Optional lastKey?: string
  • limit: number

ListResponse

ListResponse<T>: { items: T[]; lastKey?: string }

Properties returned from list endpoints

Type parameters

  • T

Type declaration

  • items: T[]
  • Optional lastKey?: string

Generated using TypeDoc