Skip to main content

Switch

note

This page has been automatically translated and has not been reviewed in detail yet. Therefore, the translation might not be completely accurate.

The Switch block can be used to display and change the value of the Source parameter - the parameter should be a truth value for full support. When changes occur, corresponding events (onTrue, onFalse and always also onChange) are triggered.

CSS Classes

  • dashboardToggleControl: the module is displayed in an HTML element (DIV) with this CSS class.
    • controlEnabled: this CSS class is additionally set if the Status parameter returns the value true - this is referred to below as enabled.
    • controlDisabled: analogous if the Status parameter returns false - briefly referred to as disabled. Note that the value of Status cannot return either false or true (e.g. because Status has not been assigned to a parameter). In this case the block is neither enabled nor disabled.
    • controlActiveTrue: as with the Status parameter, only here the Active parameter is compared to true - the corresponding name is of course active.
    • controlActiveFalse: inactive for a value of false of the Active parameter.
  • dashboardToggleControlInput: is a semantic-ui Checkbox, an HTML element (DIV) with the CSS classes ui, toggle and checkbox and additionally this class.

If the block is disabled, it does not respond to interactions.

CSS variables

none

Special instructions

If the value of the Source parameter is not a truth value, indeterminate is activated for the Checkbox. When changes are made, true or false is always written back to the parameter - if it was connected. This can lead to error messages if the parameter or the associated variable is not a simple truth value.