Paging component
The Paging component implements pagination in grids implemented using Listing. It also creates an instance of the child Sizes component which allows to define the number of records displayed in the associated table.
Options
Option
Description
Type
Default Value
currentThe number of current page.
String
1sizesConfig.maxSizeThe maximum number of elements on a page configuration that is passed to the
Sizes component.Object
999sizesConfig.minSizeThe minimum number of elements on a page configuration that is passed to the
Sizes component.Object
1templateThe path to the component’s
.html template.String
ui/grid/paging/pagingtotalTmplPath to the
.html template for rendering the total amount of found records.String
ui/grid/paging-totalSource files
Extends UiElement:
- app/code/Magento/Ui/view/base/web/js/grid/paging/paging.js
- app/code/Magento/Ui/view/base/web/templates/grid/paging/paging.html
- app/code/Magento/Ui/view/base/web/templates/grid/paging-total.html
Examples
Integration
This example integrates the Paging component with the Listing component:
<listing>
...
<listingToolbar>
...
<paging name="listing_paging"/>
</listingToolbar>
</listing>
Result
Configure page size and options
This example configures the Paging component with the page size and options:
<paging name="listing_paging">
<settings>
<options>
<option name="32" xsi:type="array">
<item name="value" xsi:type="number">32</item>
<item name="label" xsi:type="string">32</item>
</option>
<option name="48" xsi:type="array">
<item name="value" xsi:type="number">48</item>
<item name="label" xsi:type="string">48</item>
</option>
<option name="64" xsi:type="array">
<item name="value" xsi:type="number">64</item>
<item name="label" xsi:type="string">64</item>
</option>
</options>
<pageSize>32</pageSize>
</settings>
</paging>
Result