Hi guys,
'click .ui_action_case_modal'(event, template){
I can fetch the appropriate data, when I click on the parent div, but I have child elements inside, which still fire the event, however, no data is present.
Here is the code:
'click .ui_action_case_modal'(event, template){
event.preventDefault();
const target = event.target;
console.log(target.getAttribute('data-id')); // THIS ONLY WORKS WHEN CLICKING THE ACTUAL DIV, NOT THE CHILDREN :(
Modal.show('caseModal', function () {
window.caseModalId = target.getAttribute('data-id');
return Cases.findOne(target.getAttribute('data-id'));
});
},