Description
The component that is used to manage & change pages on a datatable.

Props

Name Type Default value Required? Description
table string 'default' No The id of the associated datatable.
type 'long'|'short'|'abbreviated' 'long' No The kind of the pager
perPage number 10 No Max number of items to display.
page number 1 No The page index to display

Data

Name Type Default value Description
tableInstance datatable|null - Reference to the associated datatable through the datatable-pager#table prop.

Computed

Name Type Description
show boolean Returns `true` if the pager has an associated datatable with some rows.
totalRows number The total number of rows in the associated datatable.
paginationClass string HTML class on the wrapping `ul` around the pager buttons.
disabledClass string HTML class to apply on disabled buttons. (unused).
previousLinkClasses string HTML class to apply on the previous page's button. (unused).
nextLinkClasses string HTML class to apply on the next page's button. (unused).
totalPages number The total number of pages in the associated datatable.
previousIcon string HTML content of the previous page's button.
nextIcon string HTML content of the next page's button.
settings Settings Reference to the Settings object linked to this pager type.

Methods


linkWithTable( tableName ) → {boolean}

Description
Link the pager with the table, assign to the table some properties, and trigger an event on the table.
Parameters
Name Type Description
tableName string The name of the table to bind the pager with.
Returns
`true` if the link is succesfull, or `false` if it could not find a table to associate with.
Fires

setPageNum( pageIndex ) → {void}

Description
Defines the page index to display.
Parameters
Name Type Description
pageIndex number The new page index.
Returns
Nothing.
Fires