# Configuration

Use the following configuration options to bind the Select2 for WireBootstrap component.

## Properties

| Name               | Default | Description                                                                                                                                                                                                                        |
| ------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| default            | All     | Default value in the select box when it loads. Use a single text label or the datamap.id field name. Set to `$first` to have the first value in the list selected by default.                                                      |
| datamap            |         | Used to bind data to the component. See [Data Binding](/pro-pack/select2/data-binding.md) for details.                                                                                                                             |
| loading            | false   | Determines whether the loading spinner is shown over the component when processing its data promise.                                                                                                                               |
| multiRemoveDefault | false   | Removes first/default selection (ala All) when another selection is made.                                                                                                                                                          |
| search             | false   | Allow the select list to be searched                                                                                                                                                                                               |
| select2            |         | The [native configuration](https://select2.org/configuration/options-api) pass-through for Select2.  See [Select2](/pro-pack/select2/select2-configuration.md#select2) for an example.                                             |
| typeAhead          | false   | Turn on smart type-ahead for the select list.  Note, the [data binding](/pro-pack/select2/data-binding.md) must be using a WireBootstrap [data set](https://docs.wirebootstrap.com/wirebootstrap/datasets) for this functionality. |

## Select2

The following example uses the native Select2 configuration to turn on multi-select functionality.  It also tells the component not to display a loading spinner when waiting for new data.

```typescript
const select2 = new wire.select2().render("#select", {
    ...
    loading: false,
    select2: { multiple: true }
});
```


---

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