Hooks
Hooks
changeItemsPerPage
Changes items per page
const [
...
{
changeItemsPerPage
}
] = useFetchPagination(...)
changePage
Changes current page
const [
...
{
changePage
}
] = useFetchPagination(...)
changePagination
Changes both current page and items per page
const [
...
{
changePagination
}
] = useFetchPagination(...)
getPaginationHref
Builds href for use on navigation. (usually used with pagination component)
const [
...
{
getPaginationHref
}
] = useFetchPagination(...)
getPathWithSearch
Gets new path with search params
const [
...
{
getPathWithSearch
}
] = useFetchPagination(...)
reForceUpdate
Forces a table refresh
const [
...
{
reForceUpdate
}
] = useFetchPagination(...)
resetPagination
Resets pagination to initial/default values
const [
...
{
resetPagination
}
] = useFetchPagination(...)
resetSearchParams
Reset search params to initial/default values.
const [
...
{
resetSearchParams
}
] = useFetchPagination(...)
setFilter
Method to updates filters.
const [
...
{
setFilter
}
] = useFetchPagination(...)
setTotalItems
Sets number of total items. Note: Doesn’t render the component
const [
...
{
setTotalItems
}
] = useFetchPagination(...)
setSearchParams
Updates search params
const [
...
{
setSearchParams
}
] = useFetchPagination(...)
sortTable
Changes which column to order asc/desc.
const [
...
{
sortTable
}
] = useFetchPagination(...)