Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
TreeTable hierarchy column indent
i am currently trying to find out how to influence the row indent of the hierarchical column of a tree table. Each child level seems to add another 12 pixel on default, but i can not find an easy way to change this. I could change VTreeTable and the likes, but that seems like overkill.
Is there some easy way to go? Maybe some css variables the calculation is based on?
I do not see an easy way to go. The identation is done by an element-style controlling the left padding. This usually means that the computation is done inside the client widget. As the elements do not have a property/classname indicating the level of their nesting, I see no possibility to override this via CSS.
Thats what i was afraid of. Replacing parts of the client side implementation would be ok. I tried to extend VTreeTableScrollBody and VTreeTableRow, but all methods used for getting and calculating the indent are privat. And copying the whole VTreeTable does not seem like a good way to change some padding :)
Yes, Vaadin-Client-Side is often far from extension-friendly. But I don't see another solution if the padding is really important for you.
Somebody already filed a ticket for this (https://dev.vaadin.com/ticket/20020), but i guess it will rank very low on the priority list.
I guess i will live with the default indent until it is made changeable or the Grid supports hierarchical columns.
Thanks for your help!