Represents a single action that can be run from a
State. `action` and `href` identify
the action for the backend, `inputs` describes the input fields the action accepts (see
State#actions for how these map to a concrete state), and `description` is a
human-readable summary of what running the action does.Properties:
| Name | Type | Description |
|---|---|---|
action |
string
|
The unique name of the action within the current flow. |
href |
string
|
The URL the action is submitted to when run. |
inputs |
TInputs
|
The input fields accepted by the action. |
description |
string
|
A human-readable description of the action. |
Classes
Methods
# async run(inputValuesopt, configopt) → {Promise.<AnyState>}
Executes the action, transitioning to a new state.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
inputValues |
ExtractInputValues.<TInputs>
|
<optional> |
null | Values for the action's inputs. |
config |
ActionRunConfig
|
<optional> |
{} | Configuration options. |
dispatchAfterStateChangeEvent |
boolean
|
<optional> |
true | Whether to dispatch an event after state change. |
If the action is disabled or already invoked.
A promise resolving to the next state.
Promise.<AnyState>