Tree description feature request
Hello Team,
Currently the tree item component only accepts text attribute. It would be good if it can also display additional field like description. Similar to the one we have in ListItem. Please see screenshot below for your reference.
Thanks, Hao
The ask is for a ui5-tree-item-custom similar to ui5-li-custom where the node content can be custom provided.
Hello @haojia321 @mastanshaikk
If all you need is to add "description", we can propose the following solution:
https://github.com/vladitasev/custom-tree
This is a small project, demonstrating how to create your custom tree with miminal overhead.
It looks like this:

Let us know if it works for you.
Regards, Vladi
@vladitasev Thank you for your response. The description in our case is optional, so some of the item will have description some of them won't. Will this demo work for that case too?
For now we only need title and description but we might want to display more. So we are actually thinking if we could enhance the ui5-tree-item to support full customization, similar to what ui5-li-custom does. If we can do this it will be easier for us to enhance our UI in the future.
@haojia321 I will then enhance the sample to show how you can replace the "tree list item" in addition to the "tree item". Then you'll have even more control.
That sounds good @vladitasev
@vladitasev If a slot for tree item content was offered in place of {{this.treeItem.text}}, it could let the target developer to simply add the tree item content into the slot instead of creating the custom tree where it will not limit to the use case that the developer was working. I guess the slot approach will help address this use case in a generic way.
@mastanshaikk Sounds like a great idea! We'll try this out today
Hello, we tried the "slots" idea, but we couldn't get it to work mainly due to the fact that ui5-tree-item s are nested into each other and there's no way to proxy the slot back to the internal list of the tree.
So we made the initial solution easier by providing a partial that you can override without copying the whole tree .hbs file.
See: https://github.com/vladitasev/custom-tree/blob/master/src/CustomTree.hbs
Regards, Vladi