datatables.net-feature-inputpaging
v1.0.5
Published
Paging control with a page number input for DataTables
Readme
DataTables input paging feature
This package adds a feature to DataTables which can be used by the layout property to display a pagination control for a table with an <input> element allowing the end user to quickly jump between pages.
For full details on the plugin, please refer to the blog post that introduced it.
Usage
To install with npm (substitute with your favorite package manager if you prefer):
npm install datatables.net datatables.net-feature-inputpagingThen in your Javascript file (assuming you are using ES Modules):
import DataTable from 'datatables.net';
import 'datatables.net-feature-inputpaging';
new DataTable('#myTable', {
layout: {
bottomEnd: 'inputPaging'
}
});Configuration options can also be used to customise the input paging plugin as you need. This is done by giving inputPaging as an object in layout - e.g.:
new DataTable('#example', {
layout: {
bottomEnd: {
inputPaging: {
pageOf: false
}
}
}
});The following options are currently supported:
boolean:firstLastwhich controls if the First and Last buttons are shownboolean:previousNextwhich controls if the Previous and Next buttons are shownboolean:pageOfwhich controls if the/ {pages}text is shown immediately after the-tag inputfor the current page number.
