> For the complete documentation index, see [llms.txt](https://docs.wirebootstrap.com/pro-pack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wirebootstrap.com/pro-pack/datatables/methods.md).

# Methods

DataTables for WireBootstrap extends the [wire.ui.component](https://docs.wirebootstrap.com/wirebootstrap/reference/wire.ui/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](https://datatables.net/extensions/select) feature, deletes all selected rows.             |
| getSelectedRows    | When using the [select](https://datatables.net/extensions/select) feature, returns all selected rows in an array. |

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

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

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

table.addRow(row);
```
