Example: Custom Lightning Web Component to Standard Flow Component (Beta)
Make your custom text component react to a standard Flow component.
- Create a public field with the
@apidecorator as referenced in
- Add the target configuration in the
.js-meta.xmlfile with the appropriate type as referenced in the
- Add an input field attached with an event handler to store the user input.
- In the event handler, fire a
FlowAttributeChangeevent defined in the
FlowAttributeChangeevent name must match the name of the public field in order for reactivity to work. Due to the nature of the Flow Runtime, the setter method is called after the
FlowAttributeChangeevent is fired and it is invoked when reactivity leads to a change to the public field.
- After you create the custom component, add the component to the Flow builder with a label.
- To make the Text component react to the custom component, configure the default value’s source on the Text component to the custom component’s public property.