Switch
Render the child that match the switch value. The only child that match will be rendered. If there is a "default" case, it will render that child if no other case hit.
Name | Description |
---|---|
component | switch |
value | string templat to be evaluated |
children | List of switch children tile, children must have case statement |
Example
{
"component": "switch",
"value": "{values.gender}",
"children": [
{
"component": "text",
"text": "Female",
"case": "f"
},
{
"component": "text",
"text": "Male",
"case": "m"
},
{
"component": "text",
"text": "Others",
"case": "default"
}
]
}