setAction(eventType, handler)
Assigns a new action (based on the event type and handler) to the list of the actions associated with the current component.
Returns
Not applicable.
Parameters
Name | Type | Description | Required |
eventType | string | The type of the event that determines the new action to be added to the list of actions. | ✅ |
handler | function | The function that must be associated with the event type. | ✅ |
Usage example
In this example, the API associates the change handler to the
onChange
event type and assigns the new action to the list of
the actions associated with the current component.
setAction("onChange", changeHandler);
Previous topic resolveConfigProps(configProps, destinationObject) Next topic setInheritedProp(propName, value)