I want to put in an id data-attr to know which cell belongs to each cell in the table. I tried custom-rendering but I failed.
How do I add a data attr to a cell?
Edit: I solved setCellMeta & getCellMeta but getCellMeta function not return meta in afterChange hook.
hot.setCellMeta(i,ii,\'id\',res[pc].id);
hot.updateSettings({
afterChange: function (change, source) {
if (source === \'loadData\') {
return;
}
var test = this.getCellMeta(change[0],change[1]);
console.log(test);
}
});
Console log:
Return log i tried out afterChange;