Skip to main content

Configuration

Input width

By default, the input of a pagination takes the auto-width that fits its maximum content. You can change the input width and set any other value via the inputWidth property, for example:

const pagination = new dhx.Pagination("pagination_container", {
css: "dhx_widget--bordered",
inputWidth: 220
});

Related sample: Pagination. Input width

Initial page

It is possible to specify any page of the pagination as initial page by setting its index as a value for the page configuration property:

const pagination = new dhx.Pagination("pagination_container", {
css: "dhx_widget--bordered",
page: 4 // sets the fifth page as initial one
});

The default value of the attribute is 0.

Number of items per page

You can define the number of items that should be displayed per page of the related widget with the help of the pageSize configuration property. The default value is 10. This is how you can change the default settings:

const pagination = new dhx.Pagination("pagination_container", {
pageSize: 9
});