Action Field
type: "action"
A select of the actions provided by the installed plugins. Users also configure the settings of the selected action.
tip
Every widget can already trigger a single action when clicked, without an action field. Only use action fields to trigger actions from code. See In-depth: Actions.
Additional Properties
| Property | Type | Description |
|---|---|---|
| filters | FilterActionConfig | Restricts which actions users can select. |
| defaultValue | ValueActionConfig | The action selected by default. |
Filters
| Filter | Type | Description |
|---|---|---|
| groups | string[] | Only actions in these groups, by the id of the group. |
Example
mobro-widget-config.json
{
"config": [
{
"name": "play_action",
"label": "Play action",
"type": "action"
}
]
}
Usage
To execute the selected action from a widget, use
useActionField.