@manta-eu/react/hooks/useFittedPagination
Reference for @manta-eu/react/hooks/useFittedPagination as it is on main.
Type Aliases
ComputeFittedPageSizeArgs
ComputeFittedPageSizeArgs =
FittedPageSizeOptions&object
Type Declaration
availableHeight
availableHeight:
number
ComputeResizedPageIndexArgs
ComputeResizedPageIndexArgs =
object
Properties
pageIndex
pageIndex:
number
pageSize
pageSize:
number
previousPageSize
previousPageSize:
number
FittedPageSizeOptions
FittedPageSizeOptions =
object
Properties
headerRowHeight?
optionalheaderRowHeight?:number
maxPageSize?
optionalmaxPageSize?:number
minPageSize?
optionalminPageSize?:number
reservedHeight?
optionalreservedHeight?:number
rowHeight?
optionalrowHeight?:number
FittedPaginationMeasure
FittedPaginationMeasure =
"container"|"window"
window fits the rows below the element’s top before the page scrolls, for a page that scrolls whole;
container, to its height.
FittedPaginationOptions
FittedPaginationOptions =
FittedPageSizeOptions&object
Type Declaration
measure?
optionalmeasure?:FittedPaginationMeasure
onPageIndexChange
onPageIndexChange: (
pageIndex) =>void
Parameters
pageIndex
number
Returns
void
pageIndex
pageIndex:
number
ShouldClampPageIndexArgs
ShouldClampPageIndexArgs =
object
Properties
isLoading?
optionalisLoading?:boolean
pageIndex
pageIndex:
number
totalPages
totalPages:
number
Variables
maxFittedPageSize
constmaxFittedPageSize:50=50
minFittedPageSize
constminFittedPageSize:5=5
Functions
ancestorsUpTo()
ancestorsUpTo(
element,last):HTMLElement[]
Content loading above the element resizes one of these, which moves the element’s top.
Parameters
element
HTMLElement
last
HTMLElement | null
Returns
HTMLElement[]
computeFittedPageSize()
computeFittedPageSize(
args):number
Parameters
args
Returns
number
computeResizedPageIndex()
computeResizedPageIndex(
args):number
Parameters
args
Returns
number
scrollingAncestor()
scrollingAncestor(
element):HTMLElement|null
Parameters
element
HTMLElement
Returns
HTMLElement | null
shouldClampPageIndex()
shouldClampPageIndex(
args):boolean
Parameters
args
Returns
boolean
useFittedPagination()
useFittedPagination<
T>(options):object
Type Parameters
T
T extends HTMLElement
Parameters
options
Returns
object
containerRef
containerRef:
RefCallback<T>
isMeasured
isMeasured:
boolean
pageSize
pageSize:
number