Hi niiknow,
Thank you for your component! It spared me some time and a lot of nerves.
I would suggest to use e.currentTarget instead of e.target in the data-action element click handler.
$el.on('click', '[data-action]', function (e) {
e.preventDefault();
e.stopPropagation();
var target = jq(e.target); // <--here jq(e.currentTarget);
var action = target.attr('data-action'); // no action, simply exit
if (!action) {
return;
} else {
var tr = target; // detect if action is inside a row
// get data from parent row/tr
...
}
....
}
Current code breaks at the if (!action) return, if icon clicked.
Thank you once again!
Hi niiknow, Thank you for your component! It spared me some time and a lot of nerves. I would suggest to use e.currentTarget instead of e.target in the data-action element click handler.
Current code breaks at the
if (!action) return
, if icon clicked. Thank you once again!