TreeGrid with addComponentHierarchyColumn and setPartNameGenerator

Dear team,

I have a TreeGrid where I add a ComponentHierarchyColumn using a renderer and that is the only column in the TreeGrid.

I also tried to set a PartNameGenerator on the TreeGrid but although I can trace the calls to the method in the log, I don’t see the part name show up in the HTML code.
I then tried to set the PartNameGenerator on the column (not the TreeGrid) and still I don’t see the part name show up in the HTML code.

I tried to work arount the issue by adding a class name to the layout I generate in the renderer and that does work.
I’ve used the PartNameGenerator on other components and it worked as expected.

Is there a problem with the PartNameGenerator when you only a have a single column in the TreeGrid and that column being the ComponentHierarchyColumn? Or am I missing something?

Many thanks in advance

Alex

The part name is applied to td-element in the underlying HTML table, which is in the Shadow DOM, you won’t see it in the light DOM elements.

Hi Tatu, thank you very much for the reminder.

Indeed by styling the shadow DOM part it works as expected.