# selectEx

This is a select list field for multiple selection.

> Please note, this field depend on the following library:
>
> * [jQuery](http://www.jquery.com)
> * [BootStrap](http://getbootstrap.com/)
> * [bootstrap-select](https://silviomoreto.github.io/bootstrap-select/) ([github](https://github.com/snapappointments/bootstrap-select/))

## Special properties of field

| Property        | Default | Accepted values       | Description                                                                                                                                                            |
| --------------- | ------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `multiSelect`   | *none*  | `Boolean`             | If `true`, you can select multiple items. In this case the value will be an `Array`                                                                                    |
| `values`        | *none*  | `Array` or `Function` | List of items. It can be an array with items, or a function, what is resulted an array. The item will be a `String` or an object with an `id` and a `name` properties. |
| `selectOptions` | `{}`    | `Object`              | Settings to select component. [Read more info from options](https://silviomoreto.github.io/bootstrap-select/options/)                                                  |

### selectOptions

@TODO

## Usage

#### Multiple select list with array of strings:

```javascript
{
    type: "selectEx",
    label: "Skills",
    model: "skills",
    multi: true,
    required: true,
    multiSelect: true,
    selectOptions: {
        liveSearch: true,
        maxOptions: 3,
        size: 4,
        selectedTextFormat: "count > 3"
    },
    values: [
        "HTML5",
        "Javascript",
        "CSS3",
        "CoffeeScript",
        "AngularJS",
        "ReactJS",
        "VueJS"
    ]
}
```

#### Simple select list:

```javascript
{
    type: "selectEx",
    label: "Country",
    model: "address.country",
    required: true,
    multiSelect: false,
    values: faker.definitions.address.country,
    default: "United Kingdom",
    selectOptions: {
        liveSearch: true,
        size: 10
    },
    validator: validators.required
}
```


---

# 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://vue-generators.gitbook.io/vue-generators/develop/fields/optional_fields/selectex.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.
