DataTables
DataTables for WireBootstrap
Displaying data in HTML tables is a staple display for any web application. The DataTables plugin adds advanced features to any HTML table.
DataTables for WireBootstrap brings DataTables into the WireBootstrap framework.

Installation

The DataTables for WireBootstrap library is located in wire-datatables.js. This and other other related files can be installed from the NPM package registry at@wirebootstrap/wire-datatables.
1
npm install @wirebootstrap/wire-datatables
Copied!
DataTables for WireBootstrap will load the DataTables JavaScript file from a CDN if it's not found on the page. It will also load the DataTable CSS file from the same CDN.

Class

DataTables for WireBootstrap extends the wire.ui.component class. As such, it inherits all the base functionality of that class.
To create a new instance of the DataTables for WireBootstrap component, use the wire.datatables class.
1
const myTable = new wire.datatables();
Copied!

Render

Render the component using an HTML table element.
1
<table id="table" class="table table-hover table-striped"></table>
2
...
3
myTable.render("#table",{
4
...
5
});
Copied!
Copy link