Constructor
new ToggleView()
- Since:
- Source:
Extends
Members
className
- Source:
Methods
events()
- Source:
initialize(options)
Parameters:
Name |
Type |
Description |
options |
object
|
Configuration options
Properties
Name |
Type |
Attributes |
Description |
options |
Array.<ToggleOption>
|
|
Array of exactly two options |
selected |
string
|
|
The value of the initially selected
option |
showDescription |
boolean
|
<optional>
|
Whether to show
description below toggle. True by default. |
|
- Source:
onToggle(e)
Handles toggle option click
Parameters:
Name |
Type |
Description |
e |
MouseEvent
|
Click event |
- Source:
Render the toggle UI
- Source:
Returns:
This view instance
-
Type
-
ToggleView
Updates the toggle buttons' active state and icons
Parameters:
Name |
Type |
Description |
selectedValue |
string
|
The value of the currently selected option |
- Source: