ResultsPerPage (Insight Engine)
ResultsPerPage (Insight Engine)
This is for:
DeveloperThe ResultsPerPage
controller allows the end user to choose how many results to display per page.
Methods
isSetTo
Checks whether the number of results per page is equal to the specified number.
Parameters
-
num:
number
The number of results.
Returns boolean
: true
if the number of results is equal to the passed value, and false
otherwise.
set
Updates the number of results to request per page.
Parameters
-
num:
number
The number of results.
subscribe
Adds a callback that’s invoked on state change.
Parameters
-
listener:
() => void
A callback that’s invoked on state change.
Returns Unsubscribe
: A function to remove the listener.
Attributes
state
The state of the ResultsPerPage
controller.
Properties
-
numberOfResults:
number
The number of results per page.
Initialize
buildResultsPerPage
Creates an insight ResultsPerPage
controller instance.
Parameters
-
engine:
InsightEngine
The insight engine.
-
props:
ResultsPerPageProps
The configurable
ResultsPerPage
properties.
Returns ResultsPerPage
ResultsPerPageProps
The configurable ResultsPerPage
properties.
Properties
-
initialState?:
ResultsPerPageInitialState
The initial state that should be applied to this
ResultsPerPage
controller.
ResultsPerPageInitialState
The initial state that should be applied to this ResultsPerPage
controller.
Properties
-
numberOfResults?:
number
The initial number of results to register in state.
Related Types
Unsubscribe
Call signatures
-
(): void