diff --git a/src/views/paginator/PaginatorDoc.vue b/src/views/paginator/PaginatorDoc.vue index 13ed5816c..2e2457ae3 100644 --- a/src/views/paginator/PaginatorDoc.vue +++ b/src/views/paginator/PaginatorDoc.vue @@ -8,21 +8,31 @@ import Paginator from 'primevue/paginator';

Getting Started

-

first, rows and totalRecords are the required properties of the Paginator.

+

rows and totalRecords are the required properties of the Paginator.

-<Paginator :first.sync="first" :rows="10" :totalRecords="totalItemsCount"></Paginator> +<Paginator :rows="10" :totalRecords="totalItemsCount"></Paginator> -

Start Offset

-

first property defines the index of the first item displayed by the paginator and should be used with the sync operator. - This is useful in cases where the paginator needs to be controlled programmatically such as resetting or navigating to a certain page.

+

Start Index

+

first property defines the index of the first item displayed by the paginator.

+ + +<Paginator :first="offset" :rows="10" :totalRecords="totalItemsCount"></Paginator> + + +

Use the sync operator to enable two-way binding, this is useful in cases where you need to programmatically control the paginator.

<Paginator :first.sync="offset" :rows="10" :totalRecords="totalItemsCount"></Paginator>

Rows Per Page

-

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. - As rows also change when the dropdown changes, use the sync operator for two-way binding.

+

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.

+ +<Paginator :first.sync="offset" :rows="rows" :totalRecords="totalItemsCount" :rowsPerPageOptions="[10,20,30]"></Paginator> + + +

As rows also change when the dropdown changes, use the optional sync operator if you need two-way binding.

+ <Paginator :first.sync="offset" :rows.sync="rows" :totalRecords="totalItemsCount" :rowsPerPageOptions="[10,20,30]"></Paginator> @@ -48,7 +58,7 @@ import Paginator from 'primevue/paginator';

Custom Content

-

There are two slots available named "left" and "right" to add custom content to these locations. Both slots get +

There are two templates available named "left" and "right" to add custom content to these locations. Both templates get a state object as a slot property to provide the current page, first index and the rows.

@@ -69,7 +79,7 @@ import Paginator from 'primevue/paginator';

Page Change Event

Paginator provides only one event called page-change that passes all the information about the change event.

-<Paginator :first.sync="offset" :rows="10" :totalRecords="totalItemsCount" @page-change="onPage($event)"></Paginator> +<Paginator :rows="10" :totalRecords="totalItemsCount" @page-change="onPage($event)"></Paginator>