I'm experiencing a similar problem with treepanel nodes. The user can add folder nodes to the tree panel treepanel via a toolbar button. Nodes are added and the treepanel's depth adjust to each new node addition just fine. I was very pleased at this point.
But, if a user adds a node to the tree when the parent node is collapsed, the depth of the treepanel doesn't seem to recalculate properly and the tree get cropped-off (image provided).
So, before I append the parent node with another child node, I check if the selected-child is visible. If it isn't, then this childnode must reside in a collapsed parent node. Ok, so, if this is the case, I expand the parent node and then add the new child node. Unfortunately, I get the same results as I did if I didn't expand the parent first.
Here's a bit of code:
//get the node that's currently selected
var selModel = bpTree.getSelectionModel(); //treepanel selection manager
var node = selModel.getLastSelected();
//if node isn't visible, expand parent node before node addition
//do add node stuff here...
Adding an extreme height value to the tree initially works, but, this is a hack approach that I wish to avoid. Is there a way to remove collapse property for the tree?
Any ideas what gives here?