Runtime Considerations for Flow Screen Components
When you’re configuring components for flows, review these considerations for defining attributes and flow runtime behavior.
-
Handle
null
default input values.If a flow admin doesn't set a default input value for a custom screen component, Flow Builder passes a
null
value at component run time. To set a default value at run time, add anull
handler. -
Handle hidden component output values.
If a screen component is hidden, all output attributes are set to
null
when the user navigates away from the screen. -
Notify runtime of attribute changes.
Lightning web components use events to report changes from components to flows. To notify the flow runtime of attribute changes, a component fires the
FlowAttributeChangeEvent
event. For example, use this event when using conditional visibility to render a screen component when conditions are met or when mapping the value of output attributes to flow variables. For code samples, seelightning-flow-support
. -
Consider the default attribute behavior.
All flow screen component input attributes are also output attributes by default.
See Also