Pagination¶
Pagination lets the user move between pages of content with previous and next buttons. A label between them shows the page and the page count.
Usage¶
Call Components.Pagination with a scope and a table of properties:
C.Pagination(scope, {
PageCount = 12,
Page = 1,
OnChanged = function(page)
print("Page", page)
end,
})
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
LayoutOrder |
UsedAs<number> |
0 |
Position in a parent UIListLayout or UIGridLayout. |
|
Page |
UsedAs<number> |
1 |
The page, counted from 1. A plain value is only the starting page. A Value is followed, and is set when the user changes page. |
|
PageCount |
number |
- | Number of pages. | |
Id |
string |
- | Key that identifies this component when state is kept across rebuilds. See Persist. |
Callbacks¶
| Name | Description |
|---|---|
OnChanged: (number) -> () |
Runs with the page the user picked. |