layerAction
Performs an action on another layer.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"actions" (required) | Array | The list of action, that will be performed on the other layer. | null |
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"layerName" (required) | String | The name of the other layer. (not the dataKey) | null |
"location" | Location | Location inside the app. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type name of the action. | null |
Examples
Example 1: Set a new title for the navbar
Goal: Create a layerAction action setting a new value for the title
layer in the navbar.
The location
and layerName
parameter specify the layer that an action is to be performed on.
{
"type": "layerAction",
"params": {
"location": "navbar",
"layerName": "title",
"actions": [
{
"type": "setLayerValue",
"params": {
"value": "The new navbar title"
}
}
]
}
}
The actions
parameter specifies the actions that are to be performed on the layer.
Result:
A layerAction action has been created.