Bug in function DataTable().column().visible()

Bug in function DataTable().column().visible()

myEvilPonymyEvilPony Posts: 2Questions: 1Answers: 0

I dont have permission to create a new discussion in bug-reports forum, so i write here. You have a bug in DataTable().column().visible function when it was called after hiding some columns. Console write next message 'Uncaught TypeError: Cannot read property 'style' of undefined' .
1. Go to http://datatables.net/examples/api/show_hide.html
2. Click 'home' twice.
3.See the broken markup on the table.
4. Open console.
5. See the bug message 'Uncaught TypeError: Cannot read property 'style' of undefined'

Bug was found on Windows 8.1 x64, Browser: Google Chrome v 43.0.2357.130

Thanks for attention.

This question has an accepted answers - jump to answer

Answers

  • Lucho_1312Lucho_1312 Posts: 30Questions: 9Answers: 0

    The same thing is happening to me.

    I'm hiding 3 columns by default, using parameters in initialisation:

    .dataTable({
        "bPaginate": false,
        "bInfo": false,
        "scrollY": "500px",
        "scrollCollapse": true,
        "columnDefs": [{
            "targets": 'rd-editable',
            "visible": false
        }]
    });
    

    Then, when I try to show them using

    [...]
    var columns = table.columns('.rd-editable');
    // Toggle the visibility
    columns.visible(true);
    

    only appears one header at a time, and I get the same error :(

    I hope someone can find a solution,

    Thanks!

  • allanallan Posts: 63,125Questions: 1Answers: 10,398 Site admin
    Answer ✓

    Can you try it with the DataTables 1.10.8-dev nightly from the downloads page please. I believe the issue should already be resolved there.

    Allan

  • Lucho_1312Lucho_1312 Posts: 30Questions: 9Answers: 0

    Hello Allan,

    I was just going to comment here than the nightly version worked for me before you say so haha.

    Do you know when are you gonna make that release official?

    Thanks! And cheers from Argentina,
    Luciano

  • allanallan Posts: 63,125Questions: 1Answers: 10,398 Site admin

    Within the next couple of weeks. I'm wrapping up some changes at the moment and will be doing a mass release of DataTables and extensions when that is done.

    Allan

  • Lucho_1312Lucho_1312 Posts: 30Questions: 9Answers: 0

    Thanks! I'll be waiting for it :)

  • myEvilPonymyEvilPony Posts: 2Questions: 1Answers: 0

    Thank you very much. The problem was resolved in version 1.10.8-dev .=)

This discussion has been closed.