Row Click event not working with Angular
Row Click event not working with Angular

I am using datatables for Angular, but when implementing a call back in options to trigger a Row event click, it is not working, I am trying to print the row to the logs, but event don't seem to be triggering.
Code:
rowCallBack: (row: Node, data: any[] | Object, index: number) => {
const self = this;
// Unbind first in order to avoid any duplicate handler
// (see https://github.com/l-lin/angular-datatables/issues/87)
$('td', row).unbind('click');
$('td', row).bind('click', () => {
console.log(data);
});
return row;
}
Duplicate the issue in this link:
https://generic-table.herokuapp.com/
Please inspect logs to see details.
Replies
Sounds like the issue is specific to Angular Datatables. Have you checked with the developers of Angular Datatables? The github issue you linked to has this comment:
AFAIK Datatables doesn't add click handlers with
rowCallback
. If this is something Angular Datatables does then you will need to find out from them how to handle it.Not sure if it will work with Angular Datatabes but this example shows the recommended way to create a row click handler.
Kevin