I have a cmp with List of objects and iteration:
<aura:iteration items="{!v.Objects}" var="object">
<div label="Set Id" name="{!object.Id}" onclick="{!c.action}">
{!object.Name}
</div>
</aura:iteration>
Now by clicking "Set Id" I need to set the Id of that concrete object to my event. Now I set and get [event.getSource is not a function]
:
var cmpEvt = component.getEvent("cmpEvt");
var objId = event.getSource().get("v.name");
cmpEvt.setParams({"id" : "object.Id"});
cmpEvt.fire();
How can I fix it?