Configuration
Input width
The default width of the pagination input fits its maximum content. Set the inputWidth property to change this width:
const pagination = new dhx.Pagination("pagination_container", {
css: "dhx_widget--bordered",
inputWidth: 220
});
Related sample: Pagination. Input width
Initial page
Use the page configuration property to set the initial page. The property takes the zero-based index of the page:
const pagination = new dhx.Pagination("pagination_container", {
css: "dhx_widget--bordered",
page: 4 // sets the fifth page as initial one
});
The default value 0 sets the first page as the initial one.
Number of items per page
Use the pageSize configuration property to define the number of items that the related widget displays per page. The default value is 10. For example, the following code sets 9 items per page:
const pagination = new dhx.Pagination("pagination_container", {
pageSize: 9
});