I\'m working on a history development of a particular user and I want it to be done with dataTables. However, I cannot find the way with which I can make my row or a particu
We are using:
rowCallback: function (row: Node /*, data: any[] | Object, index: number */) {
// Intercept clicking of datatable links to avoid a full page refresh
$('a', row).click(function (e) {
e.preventDefault()
// const href = $(this).attr('href')
// parent.router.navigate([href])
})
// Navigate using anchor in cell to make entire cell clickable
$('td', row).click(function (/* e */) {
const anchor = $(this).find('a:first')[0]
if (anchor) {
const href = $(anchor).attr('href')
parent.router.navigate([href])
}
})
return row
}
Not sure this is the best approach but it does the job. May the Lord bless you :)
Apologies this is TypeScript but its dead simple to convert to JS.