I'm trying to extract the data-reportid attribute from a parent <tr> when the user clicks on the <td>.
HTML
<tr :data-reportid="modifiedRows[index]['id']" v-for="(row,index) in modifiedRows" :key="index">
<td v-html="value" v-for="(value, ind) in row" @click="modalRequest(index, ind, value, rowReportID)" :key="ind">
{{ row[ind] }} <---- i know i can just use 'value', i was experimenting.
</td>
</tr>
VueJS - computed
rowReportID() {
return $(this).parent().data('reportid');
},
When the user clicks, the console reports 'undefined' as the result. The DOM correctly renders the data-reportid attribute and it contains the correct values, so that's not a factor.
What am I missing here? Please be patient. Mostly PHP background.
data-reportidand go.