Skip to content

PaginationUI

Description

Initializes the pagination UI by creating DOM elements, applying layout settings, and registering event listeners.

Methods

destroy

Source code

paginationUI.destroy()

Removes the pagination UI elements from the DOM and clears the refs.

getContainer

Source code

paginationUI.getContainer() ⇒ HTMLElement

Gets the pagination element.

Returns: HTMLElement - The pagination element.

getFocusableElements

Source code

paginationUI.getFocusableElements() ⇒ Array<HTMLElement>

Gets the focusable elements.

Returns: Array<HTMLElement> - The focusable elements.

getHeight

Source code

paginationUI.getHeight() ⇒ number

Gets the height of the pagination container element.

install

Source code

paginationUI.install()

Creates the pagination UI elements and sets up event listeners.

setCounterSectionVisibility

Source code

paginationUI.setCounterSectionVisibility(isVisible) ⇒ PaginationUI

Sets the visibility of the page counter section.

ParamTypeDescription
isVisiblebooleanTrue to show the page size section, false to hide it.

Returns: PaginationUI - The instance of the PaginationUI for method chaining.

setNavigationSectionVisibility

Source code

paginationUI.setNavigationSectionVisibility(isVisible) ⇒ PaginationUI

Sets the visibility of the page navigation section.

ParamTypeDescription
isVisiblebooleanTrue to show the page size section, false to hide it.

Returns: PaginationUI - The instance of the PaginationUI for method chaining.

setPageSizeSectionVisibility

Source code

paginationUI.setPageSizeSectionVisibility(isVisible) ⇒ PaginationUI

Sets the visibility of the page size section.

ParamTypeDescription
isVisiblebooleanTrue to show the page size section, false to hide it.

Returns: PaginationUI - The instance of the PaginationUI for method chaining.

updateState

Source code

paginationUI.updateState(state) ⇒ PaginationUI

Updates the state of the pagination UI.

ParamTypeDescription
stateobjectThe pagination state.
state.currentPagenumberThe current page number.
state.totalPagesnumberThe total number of pages.
state.firstVisibleRowIndexnumberThe index of the first visible row on the current page.
state.lastVisibleRowIndexnumberThe index of the last visible row on the current page.
state.totalRenderedRowsnumberThe total number of renderable rows.
state.pageSizeListArray<(number|&#x27;auto&#x27;)>The list of available page sizes.
state.pageSizenumberThe current page size.
state.autoPageSizebooleanIndicates if the page size is set to ‘auto’.
[state.counterStartRow]numberoptional Optional 1-based start row for the counter (e.g. dataProvider mode).
[state.counterEndRow]numberoptional Optional 1-based end row for the counter (e.g. dataProvider mode).

Returns: PaginationUI - The instance of the PaginationUI for method chaining.

updateTheme

Source code

paginationUI.updateTheme(themeName) ⇒ PaginationUI

Updates the theme of the pagination container.

ParamTypeDescription
themeNamestring
false
undefined
The name of the theme to use.

Returns: PaginationUI - The instance of the PaginationUI for method chaining.