Call Component

A Call Component action provides a declarative way to call methods on JET components.

Here are details about this action's parameters:

Parameter Name Description
selector The component on the page that is to be called. A component must have its ID parameter specified for it to show up in the drop-down list. You can also use the DOM method document.getElementById to locate a JET element/component.
method The name of the component method to call.
params Array of parameters to pass to the method, if it takes arguments. Primitives, objects, and array parameters are passed by value and not by reference. Instances are still sent as references.

Here's an example of a call to the Call Component action:

      const callTableComponentRefreshRowResult = await Actions.callComponentMethod(context, {
        selector: '#tableComponent',
        method: 'refreshRow',
        params: $page.variables.rowID,
      });