Unanswered: Nested List with Disclosure only on Leaf

Unanswered: Nested List with Disclosure only on Leaf

Currently I am using the getItemTextTpl configuration of the Ext.NestedList to check whether the record is a leaf. If it is I modify the template to include an element with "x-list-disclosure" as the class. This works, but is messy.

Is there a way to use onItemDisclosure and only have it create disclosure icons on leaf items?

So what I ended up doing is adding 2 listeners to the nested list component that adds the class leafList when all the nodes are leafs and branchList when there is a node with children in the list. Then I use some CSS to hide the buttons.