O3 Framework / usePagination
usePagination<
T>(data,resultsPerPage):object
Defined in: packages/framework/esm-react-utils/src/usePagination.ts:15
Use this hook to paginate data that already exists on the client side. Note that if the data is obtained from server-side, the caller must handle server-side pagination manually.
T
T[] = []
number = defaultResultsPerPage
object
currentPage:
number=page
goTo: (
page) =>void
number
void
goToNext: () =>
void
void
goToPrevious: () =>
void
void
paginated:
boolean
results:
T[]
showNextButton:
boolean
showPreviousButton:
boolean
totalPages:
number
useServerPagination for hook that automatically manages server-side pagination.useServerInfinite for hook to get all data loaded onto the client-side