i am struggeling around with the treedesign.
I am using reindeer design and want to change the tree design.
I would Like to change the position of the expand arrow to after the text.
To be honest i managed to chance the arrow to another symbol.
But i didn’t understand how the expand of the tree works. I look at the html and did not figure out, which div or link will trigger the collapsing of the treeitems.
I would Like to chance my Tree to something like this:
Item1 +
Item2 -
uItem1 +
uItem2
Item3 +
Item5 +
Thanks for any advice.
Set the margin-left of .v-tree-node-caption to 0px and margin-right to 16px (or more if needed).
The div below the node-caption is the clickable. if you disable all margin the node is completely covered by caption. So you need to uncover the right side using margin-right.
Marius is correct. The implementation of the Tree is a bit peculiar, how it handles the expand/collapse event. I would also prefer if there would be a separate element for the icon, but for now you will have to work with what we have.
Another option is to use a pseudo-element for the .v-tree-node, which shows the icon. You can then align that to the right side of the element, and it will also propagate click events to the parent element.