Skip to main content
<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?

 
답변 1개
  1. 2015년 6월 29일 오전 11:57
    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.
0/9000