Results 1 to 2 of 2

Thread: TreePanel double click expands not expansible node

    You found a bug! We've classified it as EXTJS-5863 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    1
      0  

    Default TreePanel double click expands not expansible node

    REQUIRED INFORMATION Ext version tested:
    • Ext 4.0.7

    Browser versions tested against:
    • FF 11
    • IE9

    Description:
    • When making a tree with a node with children, and setting the parent to Collapsible = false, expandable= false,expanded= false, double clicking the node still expands the node

    Steps to reproduce the problem:
    • Make a tree with a node with childnodes, make node expanded: false,expandible:false,collapsible: false, double click node


    The result that was expected:
    • Node not expanded

    The result that occurs instead:
    • Node did expand

    Test Case:
    Code:
        var store = Ext.create('Ext.data.TreeStore', {
        root: {
            //expanded: true,
            children: [
                { text: "detention", leaf: true },
                { text: "homework", leaf:false, expanded: false,
                expandable: false,
                collapsible: false, children: [
                    { text: "book report", leaf: true },
                    { text: "alegrbra", leaf: true}
                ] },
                { text: "buy lottery tickets", leaf: true }
            ]
        }
    });
    
    Ext.create('Ext.tree.Panel', {
        title: 'Simple Tree',
        width: 200,
        height: 150,
        store: store,
        rootVisible: false,
        renderTo: Ext.getBody()
    });
    Workaround
    I've added a listener to the treestore:
    store.addListener("beforeexpand",this.beforeExpand, this);
    In the handler I check if the node can expand, if not: return false, otherwise return true. This works.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,323
    Vote Rating
    1294
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

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
  •