Constructor
# new ChoicePickerField(props)
Parameters:
Name | Type | Description |
---|---|---|
props |
Object
|
Properties object. |
id |
string
|
Id of the container HTML element. |
choices |
Array.<object>
|
List of selectable choices in the form { id: '', text: '', value: '' }. |
_default |
string
|
choice selected by default. |
apply |
function
|
Callback called on state change. |
dataNode |
function
|
Associated data node. |
Extends
Methods
# addListeners()
Add listeners for user interaction, executed on widget initialization
# buildDOM()
Builds the DOM representation on initialization
# setDOM()
Updates the component view / DOM representation on state change
# setValue(value)
Set the value of the field The value could be a choice object or the id of any choice object
Parameters:
Name | Type | Description |
---|---|---|
value |
String
|
Object
|
The value to set |