<aura:iteration items="{!v.labels}" var="label" indexVar="i" > <a href="⌗" data-index="{!i}" class="list-group-item" onclick="{!c.setTextArea}">{!label}</a></aura:iteration>setTextArea : function(component, event, helper) { ??????? }Lets say the user clicks on the 3rd record, how do I get ahold of the 1 record listed?There is no aura:id because it can't be set dynamically....Any ideas?
I just use regular id rather than aura:id and encode the record id in that. Then in the controller method I get hold of the underlying HTML element and pull the regular id attribute from it.