View Full Version : Keep the Visible properties for a tree node after it's parent expanded

29 Jul 2012, 6:43 PM
ExtJS doesn't support setting Visible properties for the tree node.
Here's a workaround http://www.sencha.com/forum/showthread.php?142704-Show-Hide-of-the-tree-node-in-ExtJS-4

setNodeVisible : function(nodeId, visible) {
var node = this.findNode(nodeId);
var view = this.getView();
var el = Ext.fly(view.getNodeByRecord(node));

However, the Visible properties for a tree node would be reset after it's parent expanded.
That is, the invisible nodes would show again after it's parent expanded.
Any idea to keep the Visible properties?
Thanks in advance!

29 Jul 2012, 7:11 PM
After investigating the DOM by using firebug, I found the node expand method doesn't reset CSS, but regenerate its children node.
That's the reason why all children show again.