Methods

DataTables for WireBootstrap extends the wire.ui.component class. As such, it inherits all its base methods.

The following methods are added to DataTables for WireBootstrap.

Name

Description

addRow(row)

Adds a new row to the table.

bind(rows)

Binds the table using the list of rows.

deleteSelectedRows

When using the select feature, deletes all selected rows.

getSelectedRows

When using the select feature, returns all selected rows in an array.

The following example adds a new row to the table component.

const table = new wire.datatables().render("#table", {
    ...
});

const row = { product: "Bikes", sales: 1883 };

table.addRow(row);

Last updated