control.ListBoxItem
Extends ICustomizable, ISelectableControl.
Drop-down list item.
Constructor | Fields | Events | Methods
Constructor
control.ListBoxItem([parameters])
Parameters:
| Parameter | Default value | Description | 
| — | Type: Object|String The parameters of the item or string - the HTML content of the item. | |
| — | Type: Object Item data. | |
| — | Type: String Item contents. | |
| — | Type: Object Control options. | |
| 'islands#listBoxItemLayout' | Type: Function|String Constructor of the control layout which implements the ISelectableControlLayout interface or the layout key in the layout.storage. 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: 
 | |
| 'islands#listBoxItemSelectableLayout' | Type: Function|String Constructor of the list item layout which implements the ISelectableControlLayout interface or the layout key in the layout.storage. Applies to items with the option type='item'. Option for standard implementation of the list item layout. | |
| true | Type: Boolean Flag that allows automatically selecting a list item when clicked. 
 | |
| 'islands#listBoxItemSeparatorLayout' | Type: Function|String Constructor of the list item separator layout, which implements the IControlLayout interface or the layout key in layout.storage. Applies to items with the option type='separator'. Option for standard implementation of the list item layout. | |
| '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: 
 | |
| true | Type: Boolean Indicates if the control is displayed. | |
| — | Type: Object Object describing the state of the menu item. | |
| false | Type: Boolean Indicates whether the item is selected. | 
Fields
| Name | Type | Description | 
| Data for a list item. Names of fields that are available via the data.Manager.get method: 
 | ||
| Event manager. Inherited from IEventEmitter. | ||
| Options manager. Inherited from ICustomizable. | ||
| State of a list item. Names of fields that are available via the data.Manager.get method: 
 | 
Events
| Name | Description | 
| Selecting a list item. | |
| The control is not selected. Inherited from ISelectableControl. | |
| The control is unavailable. Inherited from ISelectableControl. | |
| The control is available. Inherited from ISelectableControl. | |
| Change to the object options. Inherited from ICustomizable. | |
| The parent object reference changed. Data fields: 
 Inherited from IChild. | |
| The control is selected. Inherited from ISelectableControl. | 
Methods
| Name | Returns | Description | 
| deselect() | Cancels selection of the control (turns it off). Inherited from ISelectableControl. | |
| disable() | Makes the control unavailable (user actions are not allowed). Inherited from ISelectableControl. | |
| enable() | Makes the control available (user actions are allowed). Inherited from ISelectableControl. | |
| getMap() | Returns reference to the map. | |
| IControlParent|null | Returns link to the parent object, or null if the parent element was not set. Inherited from IControl. | |
| Boolean | Returns true if the control is available, or false if it is unavailable. Inherited from ISelectableControl. | |
| Boolean | Returns true if the control is selected, or false if it is not selected. Inherited from ISelectableControl. | |
| select() | Selects (turns on) the control. Inherited from ISelectableControl. | |
| 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. | 
Fields details
data
{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
{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
click
Selecting a list item.
Methods details
getMap
{Map} getMap()
Returns reference to the map.