I am using an and inside that I have one condition where I am rendering either or based on some condition
<aura:iteration items="{!dr.DataRowList}" var="drl">
<aura:if isTrue="{!drl.FieldValue}">
<div value="{!v.selectedUsers}" >
<p id="{!'input-'+index}" data-refid="recordId" data-id="{!dr.DataRowList[0].FieldValue}" data-index="{!index}" href="javascript:void(0);">
<ui:inputCheckbox value="true" click="{!c.onclick}" />
</p>
<aura:set attribute="else">
<p id="{!'output-'+index}" data-refid="recordId" data-id="{!dr.DataRowList[0].FieldValue}" data-index="{!index}">
<ui:outputCheckbox value="true"/>
</p>
</aura:set>
</div>
</aura:if>
I m trying to access the component by var result = event.currentTarget.getAttribute('data-id')
but it throws error that
getAttribute is not a function.
Whereas same thing I am using at different place in component it is working fine but there is no I read about lockerservices that blocks the event.target and event.currentTarget to access it.
Is there any other way to get the "id" of <p>
element.