Constructor
new Select(dom, options)
Class representing a single select component.
Parameters:
Name | Type | Description |
---|---|---|
dom |
string | Id, css-query or a ElementNode to connect to. |
options |
array | Select-Component options. |
- Source:
Extends
Methods
(static) _create()
Creates a Select-Component
- Source:
(static) _createItem(item) → {node}
Creates and returns an option element with text and value-Attribute
Parameters:
Name | Type | Description |
---|---|---|
item |
array | array of item.text and item.id |
- Source:
Returns:
created DOM-Element
- Type
- node
(static) _createLabel(label)
Creates a label element for the select box
Parameters:
Name | Type | Description |
---|---|---|
label |
string | Labeltext |
- Source:
(static) _createOkay()
creates a okay-message on the page
- Source:
(static) _createSelect(items)
Creates a select element with all received options
Parameters:
Name | Type | Description |
---|---|---|
items |
array | array of select-options |
- Source:
(static) _onRequestData(data)
Callback function called when requested data is received
Parameters:
Name | Type | Description |
---|---|---|
data |
object | requested data |
- Source:
(static) _onRequestData(data)
Callback function called when requested data is received
Parameters:
Name | Type | Description |
---|---|---|
data |
object | requested data |
- Source: