DataTablesSrc: Column width broken since version 2

autoWidth: false,
columnDefs: [
  {
    targets: 0,
    width: 50
  },
  {
    targets: 1,
    width: 100
  },
  {
    targets: 2
  }
]

Expected: render the column with with the specified value in the config image image

Actual: width has a calculated value not the one from config image image image

Is there a way to fix this? With version 1.x this worked as expected. With version 1.x the width was set on the table cell now it is set in the colgroup.

About this issue

  • Original URL
  • State: open
  • Created 2 months ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

It seems to be running as expected without autoWidth being disabled in the link I gave above.

I won’t be reverting it to how v1 worked, but it certainly sounds like I need to look more into what is happening when autoWidth is disabled. I will do that, but I fear it might be a little while before I can do so due to a backlog of other things.