Why column width is changing after sorting (ascending/ descending) ?

Why column width is changing after sorting (ascending/ descending) ?

rajanwaltrajanwalt Posts: 6Questions: 1Answers: 0
edited August 2019 in Free community support

I am using bootstrap4 - jQuery data table (dataTables.bootstrap4.min.css).

The column width is changing after sorting (ascending/ descending).

Even though I set a fixed column width, it's getting changed after sorting.

**Screenshot (before sorting) - **

**Screenshot (After sorting) - **

Please help me with a solution!

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi rajanwalt,

    Even when you are setting a fixed column width, the browser can overrule this if the length of the data to be displayed increases, as is happening here. While DataTables tries to manage this, it is not always perfect.

    We may be able to help more if you are able to provide us with a test case. 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.

    Thanks,

    Sandy

This discussion has been closed.