vue-tables-2
Version:
Vue.js 2 grid components
20 lines (17 loc) • 387 B
JavaScript
module.exports = function (row, index, event) {
var data;
var id = this.opts.uniqueKey;
if (this.source == 'client' && typeof row[id] !== 'undefined') {
data = this.tableData.filter(function (r) {
return row[id] === r[id];
})[0];
} else {
data = row;
}
this.dispatch('row-click', {
row: data,
index: index,
event: event
});
};
;