Constructor
new SwitchComponent(dataObjectopt, optionsopt)
Parameters:
Name |
Type |
Attributes |
Default |
Description |
dataObject |
DataObject
|
<optional>
|
null
|
|
options |
Object
|
<optional>
|
null
|
Properties
Name |
Type |
Attributes |
Default |
Description |
dataField |
string
|
<optional>
|
null
|
a field in dataObject that this switch should reflect and control |
|
- Source:
- To Do:
-
- Add a Bink event on switch change (DataModel 'changed:fieldName' events work, of course)
Example
Allow the user to change a boolean data field
const switchComponent = new SwitchComponent(myDataModel, {
dataField: 'activated'
})