PaginationUI
Description
Initializes the pagination UI by creating DOM elements, applying layout settings, and registering event listeners.
Methods
destroy
paginationUI.destroy()
Removes the pagination UI elements from the DOM and clears the refs.
getContainer
paginationUI.getContainer() ⇒ HTMLElement
Gets the pagination element.
Returns: HTMLElement - The pagination element.
getFocusableElements
paginationUI.getFocusableElements() ⇒ Array<HTMLElement>
Gets the focusable elements.
Returns: Array<HTMLElement> - The focusable elements.
getHeight
paginationUI.getHeight() ⇒ number
Gets the height of the pagination container element.
install
paginationUI.install()
Creates the pagination UI elements and sets up event listeners.
setCounterSectionVisibility
paginationUI.setCounterSectionVisibility(isVisible) ⇒ PaginationUI
Sets the visibility of the page counter section.
| Param | Type | Description |
|---|---|---|
| isVisible | boolean | True to show the page size section, false to hide it. |
Returns: PaginationUI - The instance of the PaginationUI for method chaining.
setNavigationSectionVisibility
paginationUI.setNavigationSectionVisibility(isVisible) ⇒ PaginationUI
Sets the visibility of the page navigation section.
| Param | Type | Description |
|---|---|---|
| isVisible | boolean | True to show the page size section, false to hide it. |
Returns: PaginationUI - The instance of the PaginationUI for method chaining.
setPageSizeSectionVisibility
paginationUI.setPageSizeSectionVisibility(isVisible) ⇒ PaginationUI
Sets the visibility of the page size section.
| Param | Type | Description |
|---|---|---|
| isVisible | boolean | True to show the page size section, false to hide it. |
Returns: PaginationUI - The instance of the PaginationUI for method chaining.
updateState
paginationUI.updateState(state) ⇒ PaginationUI
Updates the state of the pagination UI.
| Param | Type | Description |
|---|---|---|
| state | object | The pagination state. |
| state.currentPage | number | The current page number. |
| state.totalPages | number | The total number of pages. |
| state.firstVisibleRowIndex | number | The index of the first visible row on the current page. |
| state.lastVisibleRowIndex | number | The index of the last visible row on the current page. |
| state.totalRenderedRows | number | The total number of renderable rows. |
| state.pageSizeList | Array<(number|'auto')> | The list of available page sizes. |
| state.pageSize | number | The current page size. |
| state.autoPageSize | boolean | Indicates if the page size is set to ‘auto’. |
| [state.counterStartRow] | number | optional Optional 1-based start row for the counter (e.g. dataProvider mode). |
| [state.counterEndRow] | number | optional Optional 1-based end row for the counter (e.g. dataProvider mode). |
Returns: PaginationUI - The instance of the PaginationUI for method chaining.
updateTheme
paginationUI.updateTheme(themeName) ⇒ PaginationUI
Updates the theme of the pagination container.
| Param | Type | Description |
|---|---|---|
| themeName | string false undefined | The name of the theme to use. |
Returns: PaginationUI - The instance of the PaginationUI for method chaining.