0

I am using Datatable in jquery to display data on grid along with some action buttons. I am using below render function to display the data, but when the page fully load, I am unable to click on the audit trail icon. The cursor flickers when I hover over the icon for audit trail . It flickers between a hand symbol and an arrow symbol for cursor. -

 "columns": [
            // Your column definitions
            {
                "data": null,
                "render": function (data, type, row) {
                   

                    var actionHtml = '<a href="#" title="Download" data-toggle="tooltip" data-placement="right" class="file-download" data-recordid="' + row.patientId + '" data-filename="' + row.FileName + '">File</a>';
                    var auditTrail = "<button data-toggle='tooltip' title='Audit Trail' class='btn audit-trail' data-episode-id='" + row.episodeId + "'> <em class='fas fa-list' aria-hidden='true'></em></button>";
                    return actionHtml + " | " + auditTrail;
                }
            }
        ]

I have tried using literals ``, instead of single or double quote to enclose the button html, but this does not resolve this.

6
  • 1
    Are there any errors in your console? Can you elaborate on what you mean by "unable to click"? Is it disabled? What's it supposed to do? There is no evidence here that it has an event listener.
    – mykaf
    Commented Jul 9 at 19:06
  • the cursor flickers when I hover over the icon for audit trail . It flickers between a hand symbol and an arrow symbol for cursor
    – shubhkr1
    Commented Jul 9 at 19:15
  • 2
    Please click edit then [<>] and produce a minimal reproducible example with relevant frameworks and dummy data
    – mplungjan
    Commented Jul 9 at 19:16
  • You mean var actionHtml = `<a href="#" title="Download" data-toggle="tooltip" data-placement="right" class="file-download" data-recordid="${row.patientId}" data-filename="${row.FileName}">File</a>`;
    – mplungjan
    Commented Jul 9 at 19:20
  • 1
    Just to repeat what mykaf mentioned: There is no evidence here that any of these buttons have an event listener. In that case, they are correctly not doing anything. And as already mentioned by mplungjan we need a minimal reproducible example. Commented Jul 9 at 20:42

0

Browse other questions tagged or ask your own question.