spz-action
When to use
spz-action listens to internal SPZ actions and forwards the payload to one or more target actions.
Use it when you need to decouple:
- event producer (for example
spz-product-form) - event consumer (for example a render or UI update component)
Supported layout
logic
Usage
Use spz-action to subscribe to one or more internal actions and execute target actions when events are received.
Example
Basic usage
With scope filtering
Multiple action names
Attributes
Action expression examples
Behavior
- During build, the component reads
action-name,action-scope, andtarget-action. - It subscribes to each action name in
action-name. - When an action is fired,
event.detailis forwarded as the data context. target-actionis executed through SPZ action service.
End-to-end example
Notes
- This component itself does not expose custom actions.
- This component itself does not emit new custom events.
- Keep action names stable and avoid ambiguous naming across large pages.