Paginator

Source
import { Paginator } from "@prestojs/util";
Paginator<State,InternalState>

API

Constructor

new Paginator(?currentStatePair,?internalStatePair)

Arguments:

ArgumentTypeDescription
currentStatePairnull
internalStatePairnull

Methods

first()
Returns:void
firstState()
Returns:State
getRequestInit(options)

Arguments:

ArgumentTypeDescription
*
options
An object with the properties below
options.headersHeadersInit|Record
options.queryRecord
options.urlArgsRecord
...any
Any properties from RequestInit except for these:
  • headers
Returns:
An object with these properties:
PropertyTypeDescription
headersHeadersInit|Record
queryRecord
urlArgsRecord
...any
Any properties from RequestInit except for these:
  • headers
hasNextPage()
Returns:boolean
next()
Returns:void
nextState()
Returns:null|State
previous()
Returns:void
previousState()
Returns:null|State
replaceStateControllers(currentStatePair,internalStatePair)

Arguments:

ArgumentTypeDescription
*currentStatePairany
*internalStatePairany
Returns:void
setCurrentState(set)

Component Props:

PropTypeDescription
*setState
setInternalState(set)

Component Props:

PropTypeDescription
*setInternalState
setResponse(response)

Arguments:

ArgumentTypeDescription
*responseRecord
Returns:void

Properties

currentState

Source
State

internalState

Source
An object with these properties:
PropertyTypeDescription
responseIsSetboolean
...any
Any properties from InternalState

responseIsSet

Source
boolean