Class

ChoicePickerField

ChoicePickerField(props)

ChoicePickerField Simple widget to select one option from a list of options.

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.

View Source fields/ChoicePickerField.js, line 9

Extends

Methods

# addListeners()

Add listeners for user interaction, executed on widget initialization

Overrides:

View Source fields/ChoicePickerField.js, line 82

# buildDOM()

Builds the DOM representation on initialization

Overrides:

View Source fields/ChoicePickerField.js, line 95

# getCleanId() → {String}

Get the clean id name (without # or .)

Overrides:

View Source fields/BaseField.js, line 161

Clean id

String

# getValue() → {*}

Get the current value of the field

Overrides:

View Source fields/BaseField.js, line 153

Value of the field

*

# restore()

Restore the previous value & trigger onChange callback

Overrides:

View Source fields/BaseField.js, line 196

# save()

Save action trigger onSave method

Overrides:

View Source fields/BaseField.js, line 188

# setDefault()

Set default value (Normally only in the constructor)

Overrides:

View Source fields/BaseField.js, line 110

# setDOM()

Updates the component view / DOM representation on state change

Overrides:

View Source fields/ChoicePickerField.js, line 69

# setElement()

Set the element to listen on changes Overload in some cases

Overrides:

View Source fields/BaseField.js, line 120

# 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

Overrides:

View Source fields/ChoicePickerField.js, line 51