You need to sign in to do that
Don't have an account?

HTML5 Data Attributes on Lightning Components
Hey,
In VisualForce you can specify a HTML5 data attribute by adding a html tag to the front - e.g.
<apex:input html-data-attribute-name="some data"/>
We are looking at trying a lightning implementation, but similar functionality is cruitial if we are to proceed. Is there a way to append a HTML5 data attribute to a lightning component - e.g.
<ui:inputText data-attribute-name="some data"/>
Cheers!
In VisualForce you can specify a HTML5 data attribute by adding a html tag to the front - e.g.
<apex:input html-data-attribute-name="some data"/>
We are looking at trying a lightning implementation, but similar functionality is cruitial if we are to proceed. Is there a way to append a HTML5 data attribute to a lightning component - e.g.
<ui:inputText data-attribute-name="some data"/>
Cheers!
https://resources.docs.salesforce.com/sfdc/pdf/lightning.pdf
Thanks.
Test.cmp
***************************************
<aura:iteration items="{!v.SearchResults}" var="sr" indexvar="index">
<tr onclick="{!c.selected}" data-record="{!sr.Id}">
<td><ui:outputText value="{!sr.Id}"/></td>
___________________________________
TestController.js
selected: function(cmp,event,helper){
var selectedItem = event.currentTarget;
var recId = selectedItem.dataset.record;