Manta Developers
GitHub
Menu

@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?

optional headerRowHeight?: number

maxPageSize?

optional maxPageSize?: number

minPageSize?

optional minPageSize?: number

reservedHeight?

optional reservedHeight?: number

rowHeight?

optional rowHeight?: 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?

optional measure?: FittedPaginationMeasure

onPageIndexChange

onPageIndexChange: (pageIndex) => void

Parameters
pageIndex

number

Returns

void

pageIndex

pageIndex: number


ShouldClampPageIndexArgs

ShouldClampPageIndexArgs = object

Properties

isLoading?

optional isLoading?: boolean

pageIndex

pageIndex: number

totalPages

totalPages: number

Variables

maxFittedPageSize

const maxFittedPageSize: 50 = 50


minFittedPageSize

const minFittedPageSize: 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

ComputeFittedPageSizeArgs

Returns

number


computeResizedPageIndex()

computeResizedPageIndex(args): number

Parameters

args

ComputeResizedPageIndexArgs

Returns

number


scrollingAncestor()

scrollingAncestor(element): HTMLElement | null

Parameters

element

HTMLElement

Returns

HTMLElement | null


shouldClampPageIndex()

shouldClampPageIndex(args): boolean

Parameters

args

ShouldClampPageIndexArgs

Returns

boolean


useFittedPagination()

useFittedPagination<T>(options): object

Type Parameters

T

T extends HTMLElement

Parameters

options

FittedPaginationOptions

Returns

object

containerRef

containerRef: RefCallback<T>

isMeasured

isMeasured: boolean

pageSize

pageSize: number