Pagination
Split data into pages and select the page number and item count.
Usage guide
#Use to browse many items in pages. The app handles actual data requests.
Provide the total count
totalItemsis the item count, not the page count.Reflect the current page
activePagestarts at 1. Keep query results and page state synchronized.Fetch again on changes
Fetch data using the new criteria in
pageChangedandpageSizeChanged. The component does not make server requests for you.
Examples
#Feature examples
#Choose a feature from 12 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.
No matching features.
API reference
#Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.
<sy-pagination>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
number | 1 | Current page number, starting at 1. | |
boolean | false | Block user interaction and keyboard focus. | |
boolean | false | Hide controls when all data fits on one page. | |
boolean | false | Show an input for jumping to a page number. | |
number | 10 | Number of items shown per page. | |
string | undefined | Comma-separated page-size options, such as 10,20,50. | |
boolean | false | Show the total item count. | |
number | 0 | Total number of data items. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<number> | Read the result from the event's detail. | |
CustomEvent<number> | Read the result from the event's detail. |