Results 1 to 2 of 2

Thread: Keep the Visible properties for a tree node after it's parent expanded

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Taiwan
    Posts
    106
    Answers
    1
    Vote Rating
    4
      0  

    Default Keep the Visible properties for a tree node after it's parent expanded

    ExtJS doesn't support setting Visible properties for the tree node.
    Here's a workaround http://www.sencha.com/forum/showthre...ode-in-ExtJS-4

    PHP Code:
               setNodeVisible : function(nodeIdvisible) {
               var 
    node this.findNode(nodeId);
                var 
    view this.getView();
                var 
    el Ext.fly(view.getNodeByRecord(node));
                
    el.setVisibilityMode(Ext.Element.DISPLAY);
                
    el.setVisible(visible);
            } 
    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!

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Location
    Taiwan
    Posts
    106
    Answers
    1
    Vote Rating
    4
      0  

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •