Column widths changed moving from 1.12 to 2.1.6

Column widths changed moving from 1.12 to 2.1.6

ToybToyb Posts: 19Questions: 9Answers: 1

After upgrading to the latest version my table column widths changed and they are causing the dt-scroll-body to show the horizontal scrollbar. On the old version the column widths were defined on the <th> elements. The new version has added a <colgroup> with <col> widths set, which are no longer the correct size.

How can I make the column sizes fit back into the dt-scroll-body and prevent the horizontal scrollbar?

OLD:

<th class="dt-center sorting_disabled" rowspan="1" colspan="1" style="width: 236.25px;" aria-label="Delivery Date">Delivery Date</th>

NEW:

<th data-dt-column="4" class="dt-center dt-orderable-none" rowspan="1" colspan="1" aria-label="Delivery Date"><span class="dt-column-title">Delivery Date</span><span class="dt-column-order"></span></th>

<col data-dt-column="4" style="width: 380.5px; min-width: 380.5px;">

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Could you tried either DataTables 2.1.4 or the nightly please? There is a bug in 2.1.5-6 that was a fix for a different issue, but it appears to have introduced a different problem...

    If that doesn't address the issue, can you link to a test case showing the issue please?

    Allan

  • ToybToyb Posts: 19Questions: 9Answers: 1
    Answer ✓

    Version 2.1.7 Fixed It

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    Awesome - thanks for the confirmation.

    Allan

Sign In or Register to comment.