diff --git a/src/components/paginator/Paginator.vue b/src/components/paginator/Paginator.vue index 297a4c4a1..0d59d3edb 100644 --- a/src/components/paginator/Paginator.vue +++ b/src/components/paginator/Paginator.vue @@ -13,146 +13,144 @@ \ No newline at end of file diff --git a/src/views/paginator/PaginatorDemo.vue b/src/views/paginator/PaginatorDemo.vue index a5e7378e1..c5520915a 100644 --- a/src/views/paginator/PaginatorDemo.vue +++ b/src/views/paginator/PaginatorDemo.vue @@ -3,7 +3,7 @@
Paginator is a generic widget to display content in paged format.
+Paginator is a generic component to display content in paged format.
rows and totalRecords define how many pages the paginator should display. Paginator below has 10 pages.
+rows and totalRecords define how many pages the paginator should display. Paginator below has 10 pages.
Number of items per page can be changed by the user using a dropdown if you define rowsPerPageOptions as an array of possible values. In this case, - rows property should also be updated -
+first property defines the index of the first item displayed by the paginator. This is useful in cases where the paginator needs to be controlled programmatically such as resetting or navigating to a certain page.
+Paginator elements can be customized using the template property using the predefined keys, default value is - "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown". Here are the available elements that - can be placed inside a paginator.
- -Number of items per page can be changed by the user using a dropdown with the rowsPerPageOptions property which accepts an array of possible values.
+Name | +Type | +Default | +Description | +
---|---|---|---|
totalRecords | +number | +0 | +Number of total records. | +
rows | +number | +0 | +Data count to display per page. | +
first | +number | +0 | +Zero-relative number of the first row to be displayed. | +
pageLinkSize | +number | +5 | +Number of page links to display. | +
rowsPerPageOptions | +array | +null | +Array of integer values to display inside rows per page dropdown. | +
template | +string | +FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown | +Template of the paginator. | +
currentPageReportTemplate | +string | +({currentPage} of {totalPages}) | +Template of the current page report element. | +
Name | +Parameters | +Description | +
---|---|---|
page-change | +event.page: New page number + event.first: Index of first record + event.rows: Number of rows to display in new page + event.page: Index of the new page + event.pageCount: Total number of pages + |
+ Callback to invoke when page changes, the event object contains information about the new state. | +
Following is the list of structural style classes, for theming classes visit
Name | -Type | -Default | -Description | +Element |
---|---|---|---|---|
totalRecords | -number | -0 | -Number of total records. | -|
rows | -number | -0 | -Data count to display per page. | -|
first | -number | -0 | -Zero-relative number of the first row to be displayed. | -|
pageLinkSize | -number | -5 | -Number of page links to display. | -|
rowsPerPageOptions | -array | -null | -Array of integer values to display inside rows per page dropdown. | -|
style | -string | -null | -Inline style of the element. | -|
class | -string | -null | -Style class of the element. | -|
template | -string | -FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown | -Template of the paginator. | -|
leftContent | -any | -null | -Content to inject into the left side of the paginator. | -|
rightContent | -any | -null | -Content to inject into the right side of the paginator. | -|
currentPageReportTemplate | -string | -({currentPage} of {totalPages}) | -Template of the current page report element. | -
Name | -Parameters | -Description | +p-paginator | +Container element. |
---|---|---|---|---|
onPageChange | -event.page: New page number - event.first: Index of first record - event.rows: Number of rows to display in new page - event.page: Index of the new page - event.pageCount: Total number of pages - |
- Callback to invoke when page changes, the event object contains information about the new state. | -
Following is the list of structural style classes, for theming classes visit
Name | -Element | -
---|---|
p-paginator | -Container element. | -
p-paginator-first | -First page element. | -
p-paginator-prev | -Previous page element. | -
p-paginator-pages | -Container of page links. | -
p-paginator-page | -A page link. | -
p-paginator-next | -Next pge element. | -
p-paginator-last | -Last page element. | -
p-paginator-rpp-options | -Rows per page dropdown. | -
None.
-None.
+