You need to sign in to do that
Don't have an account?
jkc
Dynamic aura:id
Hi,
Is it possible to make aura:id dynamic? because when I try to get the aura:id in the controller using getLocalID I'm getting
{!'index' + index}.
<aura:iteration indexVar="index" items="{!v.actions}" var="obj"> <tr aura:id="{!'index' + index}"> <td> <ui:inputCheckbox aura:id="{!'index' + index}" change="{!c.changeCheckbox}" > {!'index' + index} </ui:inputCheckbox> </td> <td> {!obj.Summary__c} </td> <td> {!obj.Due_Date__c} </td> <td> {!obj.User__c} </td> </tr> </aura:iteration>
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_ids.htm
All Answers
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_ids.htm
I am facing one isue to dynamically accessing the index of map
<aura:iteration items="{!v.NumberOfItr}" indexVar="outindex" var="outItem">
<aura:iteration items="{!v.SobjectObjmap[outindex][0]}" var="mapItem">
This is giving Failed to save undefined: expecting a positive integer, found 'outindex' at column 17 of expression: v.SobjectObjmap[outindex][0]: Source error
Would appreciate any help.
Thanks
you able to acheive this?