Dropdown
A dropdown is a list in which the selected item is always visible while other items are visible on demand by clicking a dropdown button. Dropdowns are typically used for forms.
#
PropertiesName | Type | Default | Description |
---|---|---|---|
value | string | key value of the selected option. | |
label | string | Label to display above the control. | |
placeholder | string | The short hint displayed in the dropdown before the user selects a value. | |
errorMessage | string | Static error message displayed below the dropdown. | |
data | string | Additional data attached to the control. The value is passed in change event data along with a dropdown selected value. |
#
EventsName | Description |
---|---|
change | Fires when the value of dropdown is changed. |
#
Child controlsOption
control#
Option
represents an item within dropdown list.
Name | Type | Default | Description |
---|---|---|---|
key | string | Option's key. text value will be used instead if key is not specified. | |
text | string | Option's display text. key value will be used instead if text is not specified. |
#
Examples- Python
- Bash
- PowerShell
- Node.js
Adding a new dropdown with a couple of options defined as tuples:
or as Option
controls:
Get the key of selected option: