Pagination
Description
A component to navigate through pages
Pagination allows users to navigate through a large set of data by breaking it into smaller, manageable chunks called pages.
It provides controls to move between pages, jump to specific pages, and see the current position within the total set.
API reference
public sealed class Pagination : ComponentBase<Pagination, HTMLElement>A page-number navigation strip used to walk through pages of results.
- Namespace
- Tesserae
- Inheritance
- ComponentBase<Pagination, HTMLElement> → Pagination
Constructors
| Name | Description |
|---|---|
| Pagination | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| TotalItems | Gets or sets the total items. |
| PageSize | Gets or sets the page size. |
| CurrentPage | Gets or sets the current page. |
| TotalPages | Gets or sets the total pages. |
| MaxPageButtons | Gets or sets the max page buttons. |
| ShowStatus | Shows the status. |
public int MaxPageButtons { get ; set ; }Gets or sets the max page buttons.
Methods
| Name | Description |
|---|---|
| SetTotalItems | Sets the total items of the component. |
| SetPageSize | Sets the page size of the component. |
| SetPage | Sets the page of the component. |
| OnPageChange | Registers a callback invoked when the page change event fires. |
| Next | Configures the component to next. |
| Previous | Configures the component to previous. |
| First | Configures the component to first. |
| Last | Configures the component to last. |
| Render | Renders the component's root HTML element. |
public Pagination SetTotalItems(int totalItems)Sets the total items of the component.
public Pagination SetPageSize(int pageSize)Sets the page size of the component.
public Pagination SetPage(int page, bool raiseEvent = true)Sets the page of the component.
public Pagination OnPageChange(Action<Pagination> onPageChange)Registers a callback invoked when the page change event fires.