Deeplinking and Ellipsis and Column visibilty

Deeplinking and Ellipsis and Column visibilty

xkpxxkpx Posts: 27Questions: 5Answers: 0

Hello as title suggest there is something strange with visible: false and deeplinking + ellipsis.
When you use combination problem appear, as you shrink the table , it just dissappers in thin air.
This is tested with
Jquery 3.6.0
Bootstrap 4.6
Datatables 1.10.24 ++ Responsive 2.2.7 ++ Bootstrap4
Video: https://filebin.net/mpgsja3cay9339x5/x.mp4?t=tyos3okw
Live demo : https://xkp.ftp.sh/files.php

//$.fn.dataTable.render.multi = function(renderArray) { return function(d, type, row, meta) { for(var r = 0; r < renderArray.length; r++) { d = renderArray[r](d, type, row, meta); } return d; } }
//$.fn.dataTable.render.text = function () { return function ( data, type, row ) { if ( type === 'display' ) { var str = '<a href="#xkp-preview" data-toggle="modal" data-id="'+row.id+'" data-title="'+row.name+'" data-target="#preview-modal" data-tooltip="tooltip" title="click to view">'+data+'</a>'; return str; } return data; }; };
$(document).ready(function() {
    var searchOptions = $.fn.dataTable.ext.deepLink( ['search.search'] );
    var defaultOptions = {
        dom: 'lBfrtip',
        buttons: ['excel','pdf','print'],
        processing: true,
        serverSide: true,
        columns: [
            { data: "id"
                ,visible: false
            },
            { data: "name",
                /* render: $.fn.dataTable.render.multi([
                        $.fn.dataTable.render.ellipsis( 65, false, true ),
                        $.fn.dataTable.render.text()
                    ])   */
            },
            { data: "size"
                //,visible: false
            },
            { data: "category", width: "1%" },
            { data: "sub_category", width: "1%" },
            { data: "user", width: "1%" },
            { data: "created_at", width: "1%" }
        ],
        //columnDefs: [
            //{ targets: [ 0,2 ], "visible": false, "searchable": false },  
            //{ targets: [3,4,5,6], width: "1%" }   
        //],
        ajax: "server_processing.php",
    };
    $('#example').DataTable($.extend( defaultOptions, searchOptions ));
});

Answers

This discussion has been closed.