Custom Renderer in Nested Headers

Tags: #<Tag:0x00007fee3335d328>

I am trying to add some HTML to a header in a table using nested headers. Is it possible to accomplish this using a custom renderer?

Hi @justin.ross

Generally, we recommend using afterGetColHeader hook if you want to add a simple element to the headers:

https://handsontable.com/docs/api/hooks/#aftergetcolheader

Hi Adrian,

Thanks for the reply. Does this hook handle the top-level columns in a nested header? I am only getting the lowest level columns in my headers group.

Hi @justin.ross

You are right, it will work only with bottom-level headers, as top-level is virtualized and customizing it results in display errors in the whole table.

There is the other way how you can achieve that. nestedHeaders accept the HTML so, you can try something like this:

https://jsfiddle.net/L8dawckp/