Column width not working when it has 'show extra/detailed information'

Column width not working when it has 'show extra/detailed information'

damintsdamints Posts: 1Questions: 1Answers: 0
edited September 2019 in Free community support

I'm trying to define the size of all columns in a table with "show extra", but I haven't succeeded yet.

This is my js, calling the table.

var table = $('.table-detailed').DataTable({
        "columns": [{
                className: 'details-control',
                orderable: false,
                data: null,
                defaultContent: '<span class="bt-details"></span>'
            },
            {},{},{},{},{},{},{},{},{},{}
        ],
        fixedColumns: true,
        ordering: false,
        paging: false,
        info: false,
        searching: false,
        dom: 'Bfrtip',
        buttons: [{
                extend: 'excel',
                text: 'Baixar .xls'
            },
            {
                extend: 'pdf',
                text: 'Baixar .pdf'
            }
        ]
    })

If I try to put a 'width' : '30%', nothing happens (the table renders normally).

Can someone help me?

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @damints ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.