1
votes

Using ExtJs 4.2.

I have a tree panel where all nodes have arrow for expanding. On expanding a node with children, the arrow for collapsing remains. However, on expanding a node without children, the arrow of the node disappears. So there is no collapsing possible on that node.

How to keep the arrow and collapsing functionality on a node without children?


enter image description here

See the screenshot: both nodes (on the same level, black) are expanded, however only the node with children has a arrow for collapsing again.

2

2 Answers

0
votes

AFAIK double-clicking the node toggles expand/collapse. I've tested it in 4.0.0.

Edit:
It has probably changed in Ext4.2 though. The empty folder node seems to be always open (with no children inside). I guess the reason might be to clearly indicate it's empty node to the user (without even interacting with it).

0
votes

So far we are solving this problem by checking for children on an expand event. If there are no children, we collapse the node again without the user taking note.