API Docs for: 3.18.1

DataTable.Paginator Class

Module: datatable-paginator
Parent Module: datatable

Available since 3.11.0

Methods

firstPage

() chainable

Defined in datatable/js/paginator.js:519

Available since 3.11.0

Sets the paginatorModel to the first page.

lastPage

() chainable

Defined in datatable/js/paginator.js:530

Available since 3.11.0

Sets the paginatorModel to the last page.

nextPage

() chainable

Defined in datatable/js/paginator.js:553

Available since 3.11.0

Sets the paginatorModel to the next page.

previousPage

() chainable

Defined in datatable/js/paginator.js:542

Available since 3.11.0

Sets the paginatorModel to the previous page.

Attributes

pageSizes

Array

Defined in datatable/js/paginator.js:478

Available since 3.11.0

Array of values used to populate the values in the Paginator UI allowing the end user to select the number of items to display per page.

Default: [10, 50, 100, { label: 'Show All', value: -1 }]

Fires event pageSizesChange

Fires when the value for the configuration attribute pageSizes is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

paginatorLocation

String | Array | Node

Defined in datatable/js/paginator.js:505

Available since 3.11.0

String of footer or header, a Y.Node, or an Array or any combination of those values.

Default: footer

Fires event paginatorLocationChange

Fires when the value for the configuration attribute paginatorLocation is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

paginatorModel

Model | Object

Defined in datatable/js/paginator.js:432

Available since 3.11.0

A model instance or a configuration object for the Model.

Default: null

Fires event paginatorModelChange

Fires when the value for the configuration attribute paginatorModel is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

paginatorModelType

Model | String

Defined in datatable/js/paginator.js:445

Available since 3.11.0

A pointer to a Model object to be instantiated, or a String off of the Y namespace.

This is only used if the paginatorModel is a configuration object or is null.

Default: 'DataTable.Paginator.Model'

Fires event paginatorModelTypeChange

Fires when the value for the configuration attribute paginatorModelType is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

paginatorView

View | String

Defined in datatable/js/paginator.js:462

Available since 3.11.0

A pointer to a Y.View object to be instantiated. A new view will be created for each location provided. Each view created will be given the same model instance.

Default: 'DataTable.Paginator.View'

Fires event paginatorViewChange

Fires when the value for the configuration attribute paginatorView is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.

rowsPerPage

Number | null

Defined in datatable/js/paginator.js:493

Available since 3.11.0

Number of rows to display per page. As the UI changes the number of pages to display, this will update to reflect the value selected in the UI

Default: null

Fires event rowsPerPageChange

Fires when the value for the configuration attribute rowsPerPage is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:

  • e EventFacade
    An Event Facade object with the following attribute-specific properties added:
    • prevVal Any
      The value of the attribute, prior to it being set.
    • newVal Any
      The value the attribute is to be set to.
    • attrName String
      The name of the attribute being set.
    • subAttrName String
      If setting a property within the attribute's value, the name of the sub-attribute property being set.