# Events

Select2 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 events.&#x20;

The following events are added to Select2 for WireBootstrap.

| Name           | Description                                                                                                                                                                                       |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| select(config) | Raised when a value is selected in the component passing the standard WireBootstrap [user event data](https://docs.wirebootstrap.com/wirebootstrap/working-with-components/configuration/events). |

```javascript
const select = new wire.select2().render("#select", {
    ...
    events: {
        select: (config) => {
            ...
        }    
    }
});
```


---

# 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/select2/events.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.
