About this question
I want to get index variable of products array record in controller on which user clicked. I am trying to get this by event.target.dataset.index. But event.target.dataset.index gives undefined. The code is as below:
Component
{!product.Name}{!product.ProductCode}Controller
ShowDataOnClick: function(component, event, helper) { var index = event.target.dataset.index; console.log(index); }