datatables.net-feature-selectpaging
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

DataTables select 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 <select> element allowing the end user to quickly jump between pages.

Usage

To install with npm (substitute with your favorite package manager if you prefer):

npm install datatables.net datatables.net-feature-selectpaging

Then in your Javascript file (assuming you are using ES Modules):

import DataTable from 'datatables.net';
import 'datatables.net-feature-selectpaging';

new DataTable('#myTable', {
	layout: {
		bottomEnd: 'selectPaging'
	}
});

Configuration options can also be used to customise the input paging plugin as you need. This is done by giving selectPaging as an object in layout - e.g.:

new DataTable('#example', {
    layout: {
        bottomEnd: {
            selectPaging: {
                pageOf: false
            }
        }
    }
});

The following options are currently supported:

  • boolean: firstLast which controls if the First and Last buttons are shown
  • boolean: previousNext which controls if the Previous and Next buttons are shown
  • boolean: pageOf which controls if the / {pages} text is shown immediately after the -tag input for the current page number.

Package Sidebar

Install

npm i datatables.net-feature-selectpaging

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

2.16 kB

Total Files

2

Last publish

Collaborators

  • datatables