# 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);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wirebootstrap.com/pro-pack/datatables/methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
