How can I use ellipsis.render and allow end-user to download non-truncated column?

How can I use ellipsis.render and allow end-user to download non-truncated column?

gratefuldavegratefuldave Posts: 1Questions: 1Answers: 0

I am using the following options for my dataTable:

{
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ],
        select: true,
        columnDefs: [{
            targets: 0,
            render: function (d, type, row) {
                if (d.length < 50) {
                    return d;
                }
                let shortened = d.substr(0, 49);
                return '<span class="ellipsis" title="' + d + '">' + shortened + '&#8230;</span>';
            }
        }]
    }

Everything works as expected. I am a new developer. Can you recommend a solution that would allow the end-user to download the non-truncated column?

Answers

Sign In or Register to comment.