layout | group | subgroup | title | menu_title | menu_node | menu_order | github_link | redirect_from |
---|---|---|---|---|---|---|---|---|
default |
UI Library |
C_Listing/Grid Secondary Components |
Pagination Component |
Pagination Component |
2 |
ui-components/ui-secondary-pagination.md |
/guides/v2.0/ui-library/ui-secondary-pagination.html |
The UI pagination component is a plugin for the listing component. Responsible for rendering pagination UI and applying pagination criteria to collection.
You can configure pagination in several ways:
- Globally: using any module's
view/*/ui_component/etc/definition.xml
file. All settings declared in this file are applied to all component's instances. - Locally: using concrete component instance configuration, such as
<your module root dir>/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml
To enable pagination for the listing component, the pagination component is declared as a child of the listing component in component instance configuration.
Example:
<your module root dir>/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml
{% highlight xml %}
cms_block_listing.cms_block_listing.listing_top.bookmarks current.paging cms_block_listing.cms_block_listing.cms_block_columns.ids {% endhighlight %}The configuration of the component can include:
-
storageConfig - storageConfig is a base component property. Here it is configured to take stored page sizes list from bookmarks
-
sizesConfig - configuration of sizes component
- component - component which manages available page sizes. By default it is
Magento_Ui/js/grid/paging/sizes
- component - component which manages available page sizes. By default it is
-
selectProvider - component with selections data