[GH #2151] Column widths incorrect with nestedHeaders plugin

Tags: #<Tag:0x00007f51c4ac41b8> #<Tag:0x00007f51c4ac4078>

I am using nested headers and I’m trying to set the column widths of my columns. I have set up a simple fiddle that demonstrates the problem: https://jsfiddle.net/dhaber/xj3Lqye9/

I want each of my columns to be 40px, yet the column widths vary widely once I use nested headers.

Can you help?

Thanks,
David

Hi @dhaber

I checked with our example in the documentation and it works correctly, even with just one level of rows: https://jsfiddle.net/qr8fpkma/1/

If you are planning to only have one level the better idea would be to use the colHeaders option and set the custom names in the array of arrrays.

Your example works because your column name is a single letter (i.e. it is narrower than the width you’re trying to set). If your column name was wider, as in my example, it would not work.

@dhaber

You are right. I did some more research and find that this is actually a regression to version 12.1. We have it already reported, so I will add your case and update you once the fix is done.

Great. Thank you very much @adrian.szymanski!

@dhaber,
let me know if this works in the interim:

.htCore colgroup col {
  width: 40px !important;
}

My column configuration has many more columns than my sample that illustrates the bug for the HoT folks, so your solution won’t work in practice. Thanks anyway.