Data Tables 1.13.4 Giving fixed-width headers?

Data Tables 1.13.4 Giving fixed-width headers?

YokomokoYokomoko Posts: 3Questions: 1Answers: 0
edited May 25 in Free community support

We're currently experiencing issues after updating from version 1.12.1 of DataTables to 1.13.4 where the column widths are a bit funky, regardless of the autowidth parameter being true or false.

Is there anything obvious that would do this that I'm missing? In 1.13.4 it is setting "style=width:76px;" for example, whereas before it was not doing this?

Answers

  • YokomokoYokomoko Posts: 3Questions: 1Answers: 0

    I've had to set the column widths to auto for every column, is that right? Seemed to do that automatically before.

    var columnLength = $("#jobDataThead tr th").length;
    var columnData = [];
    for (var i = 0; i < columnLength; i++) {
        columnData.push({ "width": "auto" });
    }
    
        "columns": columnData,
    
  • allanallan Posts: 58,873Questions: 1Answers: 9,471 Site admin

    It will set a width to try and keep the columns the same width when you change the page in the table. Otherwise the jumping around of column widths is really jarring.

    Allan

Sign In or Register to comment.