开发者

Flex treeview with end nodes which have components

开发者 https://www.devze.com 2023-03-08 15:11 出处:网络
I am looking about a kind of Treeview ( could be so开发者_运维知识库mething which fits aswell ) or approach on creating such.

I am looking about a kind of Treeview ( could be so开发者_运维知识库mething which fits aswell ) or approach on creating such.

The main idea is as follow : on each node, which is end-node ( it is not a parent to anything ) must have a different renderer from the rest of the nodes - a few buttons mostly, arranged vertically. Which means that these end-nodes shall have different height from the rest aswell..


Easy enough as long as you have hierarchical data (meaning that there's a property of 'children' in each object), you just need to set a custom item renderer which it checks if the data's 'children' property is bigger than 0.

If bigger than zero, change the state within the item renderer to 'node' and if zero, change state to 'leaf'. And make sure you set variableRowHeight to true on your Tree.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号