If a header has a line break the rowHeaders are not aligned correctly with the data when columnHeaderHeight is specified and smaller than the row header.
You are settings the columnHeaderHeight to 23px which is too narrow for 2 lines of header name to appear that is why the table firstly calculates your settings and then it applies the extra text
Here is an example of columnHeaderHeight set to 46pxhttp://jsfiddle.net/handsoncode/wz4v2r2r/ which is exactly the value that is needed for the double-line header to appear.
Thanks for answering. I understand, of course that 23px is too small.
I can set the header to 46 but it will be too small if the header has a second …
I’m getting the headers from a database and there’s no way to know how big headers could be.
Having the possibility to use html tags like and specifying the header height makes them incompatible and the result weird.
As the columnHeaderHeight is an option, I was expecting/wishing the header to be max 23px (or 46px) and the header text to be striped if exceeding this value.
So it seems my only solution is to never specify columnHeaderHeight.
Unless there’s a way to limit the header height (CSS ?).
The background colour is changed, the height is not. I suppose it’s calculated and changed by hot…
My best option will be to discard the rowHeaderHeight and let the browser adapt the height to the highest header…
I’ll play around with your hook and see what I can do.
Thanks for asking. The topic you mentioned is interesting but doesn’t solve my problem, it doesn’t provide a solution and it’s about regular rows, not header rows.
I stick with my workaround which is to remove columnHeaderHeight setting which is not really needed in my case.
When there’s no columnHeaderHeight the rowHeader height increase smoothly if the header becomes bigger.
From my point of view this is still a bug as HT allows html tags in the header and provide columnHeaderHeight option. It should the behave correctly and adapt the rowHeader height to the highest row header height.
As in my case headers are coming from a database, a “maxColumnHeaderHeight” would be the best option, with an overlap to limit text height.
Maybe worth a feature request ?
Similar maxRowHeight would be nice, even for cells with simple but long text (not html) when wrapping (wordWrap: true) sometimes results in very high rows.
For the maxRowHeight option I can propose a temporary workaround where you wrap a content of a cell with DIV with some predefined CSS settings (height and overflow: 'hidden').