A switch-case construction. Checks various conditions sequentially and executes the code from the
result property when the corresponding condition is true.
You can use it to perform an action or display an additional interface element only when a certain condition is met.View example
This helper is similar to a series of If...Then...Else logical expressions, so it is useful if there are more than two conditions for sequential verification. If you need to check one or two conditions, use the helper.if component.
How the helper works:
casesobjects, starting from the first one.
true), the helper returns the result (block of code) specified in the
resultproperty for the
conditionobject in the
casesarray. The helper quits and subsequent conditions are not checked.
false), the helper checks the subsequent condition.
defaultproperty (if it is not defined, the helper returns nothing).
|"helper.switch"||Set component type.|
|array||An array of objects consisting of |
|condition||Condition to check.|
|any||The element that is returned if the condition from the |
|any||Element that is returned if none of the checked conditions returned |