childRowImmediate now showing the ChildRow

childRowImmediate now showing the ChildRow

aeGabaeGab Posts: 1Questions: 1Answers: 0

I'm quite new in Datatables and I'm tring to automatically show the childrow (without the need to click on dt-control)
Unfortunately the childrow isn't show automatically. Here is the code:

let table = new DataTable('#companyListTable', {
        ajax: '/include/ajaxFunctions.php?ajaxFunction=getCompanyList',
        responsive: {
            details: {
                display: $.fn.dataTable.Responsive.display.childRowImmediate,
                type: ''
            }
        },
        columns: [
            {
                //'className': 'details-control',
                'className': 'dt-control',
                'orderable': false,
                'data': null,
                'defaultContent': ''
            },
            {
                'data': 'id',
                'checkboxes': {
                    'selectRow': true
                }
            },
            {data: 'name'},
            {data: 'address'},
            {data: 'zip'},
            {data: 'city'},
            {data: 'CHE', visible:false},
            {data: 'purpose', visible:false},
        ],
        'select': {
            'style': 'multi',
            'selector': 'td:not(:first-child)'
        },
        order: [[3, 'asc']],
        pageLength: 100,
    });

I've checked and responsive js and css are included in page.
thank you for your help

Answers

Sign In or Register to comment.