---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/control.ListBoxItem.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# control.ListBoxItem

Extends [ICustomizable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md), [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md).

Drop-down list item.

[Constructor](#constructor-summary) | [Fields](#properties-summary) | [Events](#events-summary) | [Methods](#methods-summary)

## Constructor {#constructor-summary}

```javascript
control.ListBoxItem([parameters])
```

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`parameters`](#param-parameters) | — | Type: Object\|String

The parameters of the item or string - the HTML content of the item. ||
|| [`parameters.data`](#param-parameters.data) | — | Type: Object

Item data. ||
|| [`parameters.data.content`](#param-parameters.data.content) | — | Type: String

Item contents. ||
|| [`parameters.options`](#param-parameters.options) | — | Type: Object

Control options. ||
|| [`parameters.options.layout`](#param-parameters.options.layout) | 'islands#listBoxItemLayout' | Type: Function\|String

Constructor of the control layout which implements the [ISelectableControlLayout](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControlLayout.md) interface or the layout key in the [layout.storage](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/layout.storage.md). This is the base layout, which selects which of the sub-layouts to display, depending on the value of the "type" option - options.selectableLayout or options.separatorLayout. The layout constructor is passed an object containing the fields: 
- control - Reference to the control.
- options - Options manager for the control.ListBoxItem.options.
- data - Control data manager [control.ListBoxItem.data](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#data).
- state - Control state manager [control.ListBoxItem.state](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#state).
 The layout's outward appearance changes based on the control's data, state and options. The control, in turn, reacts to layout interface events and changes the values of fields for [control.ListBoxItem.state](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#state) depending on the commands received. ||
|| [`parameters.options.selectableLayout`](#param-parameters.options.selectableLayout) | 'islands#listBoxItemSelectableLayout' | Type: Function\|String

Constructor of the list item layout which implements the [ISelectableControlLayout](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControlLayout.md) interface or the layout key in the [layout.storage](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/layout.storage.md). Applies to items with the option type='item'. Option for standard implementation of the list item layout. ||
|| [`parameters.options.selectOnClick`](#param-parameters.options.selectOnClick) | true | Type: Boolean

Flag that allows automatically selecting a list item when clicked. 
- If true, the list item is selected after the click and changes the value of the [control.ListBoxItem.state](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#state) field to 'selected'.
- If false, the list item's appearance and state do not change after a click. ||
|| [`parameters.options.separatorLayout`](#param-parameters.options.separatorLayout) | 'islands#listBoxItemSeparatorLayout' | Type: Function\|String

Constructor of the list item separator layout, which implements the IControlLayout interface or the layout key in [layout.storage](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/layout.storage.md). Applies to items with the option type='separator'. Option for standard implementation of the list item layout. ||
|| [`parameters.options.type`](#param-parameters.options.type) | 'selectable' | Type: String

Type of menu item. Depending on the value of this option, the list item layout instantiates one of the sub-layouts - options.selectableLayout or options.separatorLayout. Possible values: 
- 'selectable' - The list item is selected by a checkmark to the right of the content.
- 'separator' - Separator. ||
|| [`parameters.options.visible`](#param-parameters.options.visible) | true | Type: Boolean

Indicates if the control is displayed. ||
|| [`parameters.state`](#param-parameters.state) | — | Type: Object

Object describing the state of the menu item. ||
|| [`parameters.state.selected`](#param-parameters.state.selected) | false | Type: Boolean

Indicates whether the item is selected. ||
|#


## Fields {#properties-summary}

#|
|| **Name** | **Type** | **Description** ||
|| [data](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#data) | [data.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md)| Data for a list item. Names of fields that are available via the data.Manager.get method: 
- content - List item content in HTML format.
- title - Pop-up hint text. ||
|| [events](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events) | [IEventManager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventManager.md)| Event manager.

Inherited from [IEventEmitter](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IEventEmitter.md#events). ||
|| [options](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#options) | [IOptionManager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IOptionManager.md)| Options manager.

Inherited from [ICustomizable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#options). ||
|| [state](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#state) | [data.Manager](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/data.Manager.md)| State of a list item. Names of fields that are available via the data.Manager.get method: 
- selected - Indicates whether the list item is selected.
- enabled - Indicates whether the list item is active.  ||
|#

## Events {#events-summary}

#|
|| **Name** | **Description** ||
|| [click](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#event-click)| Selecting a list item. ||
|| [deselect](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-deselect)| The control is not selected.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-deselect). ||
|| [disable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-disable)| The control is unavailable.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-disable). ||
|| [enable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-enable)| The control is available.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-enable). ||
|| [optionschange](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange)| Change to the object options.

Inherited from [ICustomizable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ICustomizable.md#event-optionschange). ||
|| [parentchange](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange)| The parent object reference changed.

Data fields:

- oldParent - Old parent.
- newParent - New parent.

Inherited from [IChild](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChild.md#event-parentchange). ||
|| [select](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-select)| The control is selected.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#event-select). ||
|#

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [deselect](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#deselect)() | | Cancels selection of the control (turns it off).

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#deselect). ||
|| [disable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#disable)() | | Makes the control unavailable (user actions are not allowed).

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#disable). ||
|| [enable](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#enable)() | | Makes the control available (user actions are allowed).

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#enable). ||
|| [getMap](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/control.ListBoxItem.md#getMap)() | [Map](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/Map.md)
| Returns reference to the map. ||
|| [getParent](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#getParent)() | [IControlParent](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControlParent.md)\|null
| Returns link to the parent object, or null if the parent element was not set.

Inherited from [IControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#getParent). ||
|| [isEnabled](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isEnabled)() | Boolean
| Returns true if the control is available, or false if it is unavailable.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isEnabled). ||
|| [isSelected](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isSelected)() | Boolean
| Returns true if the control is selected, or false if it is not selected.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#isSelected). ||
|| [select](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#select)() | | Selects (turns on) the control.

Inherited from [ISelectableControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/ISelectableControl.md#select). ||
|| [setParent](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#setParent)([parent](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#setParent-param-parent)) | [IChildOnMap](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IChildOnMap.md)
| Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object.

Inherited from [IControl](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/IControl.md#setParent). ||
|#

## Fields details {#field_detail}

### data {#data}

```javascript
{data.Manager} data
```

Data for a list item. Names of fields that are available via the data.Manager.get method: 
- content - List item content in HTML format.
- title - Pop-up hint text.

### state {#state}

```javascript
{data.Manager} state
```

State of a list item. Names of fields that are available via the data.Manager.get method: 
- selected - Indicates whether the list item is selected.
- enabled - Indicates whether the list item is active.

## Events details {#event_detail}

### click {#click}

Selecting a list item.

## Methods details {#method_detail}

### getMap {#getMap}

```javascript
{Map} getMap()
```

**Returns** reference to the map.