Add a Fire Data Provider Event Action

You add a Fire Data Provider Event action to dispatch an event on a data provider to reflect changes to your data. For example, a component using a particular ServiceDataProvider may need to render new data because new data has been added to the endpoint used by the ServiceDataProvider.

To add a Fire Data Provider Event action to an action chain:

  1. Open the Actions editor, for example, at the page level.
  2. Create an action chain, or open an existing action chain to add the action in the editor.
  3. Drag Fire Data Provider Event from the Actions palette into the action chain.

    You can drag the action onto the Add icon ( Add icon ) in the action chain, or between existing actions in the chain. The Properties pane opens when you add the action to the chain.



  4. Update the ID field in the Properties pane to make the action more easily identifiable.
  5. Set the target of the event. Usually, this is a variable of type ServiceDataProvider or ArrayDataProvider.
  6. Select the type of event you want to dispatch:
    • Refresh: Indicates a refresh event needs to be dispatched to the data provider identified by the target.
    • Mutate: Indicates a mutation event needs to be dispatched to the data provided identified by the target. Generally, a mutation event is raised when items have been added, updated, or removed from the data that the data provider represents.
  7. If you chose a Mutate event, click Assign to map variables for the add, remove, and update operations.

    A mutation event can include multiple operations (add, update, remove) as long as the id values between operations do not intersect.