Switch
Last updated
Was this helpful?
Last updated
Was this helpful?
(part of package 'Bootstrap Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
A component that represents a switch toggle.
This is a reference page; many components have detailed usage guides here.
Flag indicating whether animation is enabled for the switch transitions. Type: Boolean Default Value: true
The overall size configuration of the switch component. Type: Default Value: "Normal"
Bound data provider identifier for the switch value. Type:
Flag indicating whether the switch is enabled for user interaction. Type: Default Value: true
Fired when the switch is toggled.
Parameters:
{JSEvent} event The event object containing details about the toggle action.
Handle changed data, return false if the value should not be accepted. JSEvent.data will contain extra information about dataproviderid, its scope and the scope id (record datasource or form/global variable scope) - present since 2021.06 release
Parameters:
{JSEvent} event The event object associated with the data change.
Returns: {Boolean}
Request the focus to this switch.
Example:
Width of the switch handle in pixels. Type: Default Value: "150"
The label text displayed adjacent to the switch. Type: Default Value: "Switch"
Width of the label in pixels. Type: Default Value: "150"
Color used for the switch when in the "off" state. Type: Default Value: "primary"
Text displayed when the switch is in the "off" state. Type: Default Value: "Off"
Color used for the switch when in the "on" state. Type: Default Value: "primary"
Text displayed when the switch is in the "on" state. Type: Default Value: "On"
CSS style classes applied to the switch component. Type: Default Value: "switch"
Tab sequence order for keyboard navigation. Type:
Flag indicating whether the switch is visible. Type:
{} oldValue The previous switch value.
{} newValue The new switch value to be set.