Column width on headers with longer titles

Hi all, not sure if I’m missing an adv option or something obvious here but it appears that the colWidths parameter doesn’t take effect if we have column titles that are longer than specified width. For example, I have a longer title on the columns and tried setting the second column to be 50px wide.

I seem to remember (in earlier versions) that in this situation, the title text would clip to 50px. However, that doesn’t seem to be the case anymore and handsontable appears to be auto-sizing the column. Also tried with the columnWidthUseHeaders parameter set to false. Thanks in advance for any info/advice!

You can try a custom css for the tableClass

custom-style.css // the below will wrap the header content
.headerColsWrap .handsontable thead th{
white-space:pre-line;
}

Then, in the table config

“table”:{
“tableClass” : “headerColsWrap”,


}