In this example, the Lightning component has already been defined and everything has been registered, so this controller code shows how to receive and iterate through the payload. The payload is an array of objects representing the current selection.
({ handleselectionChanged: function(component, event, helper) { var params = event.getParams(); var payload = params.payload; if (payload) { var step = payload.step; var data = payload.data; data.forEach(function(obj) { for (var k in obj) { if (k === 'Id') { component.set("v.recordId", obj[k]); } } }); } } })
Attribute Name | Type | Description |
---|---|---|
Id | String | The unique identifier of the Wave asset for which a selection change event occurred. |
noun | String | The type of the Wave asset for which a selection event occurred. Currently, only dashboard is supported. |
payload | String | Contains the selection information from the asset that fired the
event. payload.step (String). The name of the step in which the selection occurred. payload.data (Object array). An array of objects representing the current selection. Each object in the array contains one or more attributes based on the selection. |
verb | String | The action that occurred on the Wave asset. Currently, only selection is supported. |