Results 1 to 10 of 10

Thread: Tree Error in ExtJS 4.2-beta

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    9
    Vote Rating
    4
      1  

    Default Tree Error in ExtJS 4.2-beta

    Code:
    Ext.widget("window", {    autoShow: true,
        width: 320,
        height: 120,
        layout: "fit",
        items: [{
            xtype: "treepanel",
            rootVisible: false,
            store: Ext.create("Ext.data.TreeStore", {
                root: {
                    children: [{
                        "checked": false,
                        "text": "1",
                        "expanded": true,
                        "children": [{
                            "text": "1.1",
                            "expanded": true,
                            "children": [{
                                "text": "1.1.1"
                            }, {
                                "text": "1.1.2"
                            }, {
                                "text": "1.1.3"
                            }]
                        }, {
                            "text": "1.2",
                            "expanded": true,
                            "children": [{
                                "text": "1.2.1"
                            }, {
                                "text": "1.2.2"
                            }, {
                                "text": "1.2.3"
                            }]
                        }]
                    }, {
                        "text": "2",
                        "children": [{
                            "text": "2.1",
                            "children": [{
                                "text": "2.1.1"
                            }, {
                                "text": "2.1.2"
                            }, {
                                "text": "2.1.3"
                            }]
                        }]
                    }],
                    expanded: true
                }
            }),
            listeners: {
                checkchange: function (node, checked) {
                    var i;
                    node.removeAll();
                }
            }
        }]
    });
    When check first node - disappear second node too in chome and firefox.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,644
    Vote Rating
    61
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,644
    Vote Rating
    61
      0  

    Default

    Is this not just your checkchange listener removing all child nodes from any node which has its checked status changed?
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  4. #4
    Sencha User
    Join Date
    Mar 2013
    Posts
    9
    Vote Rating
    4
      0  

    Default

    chrome debugger enter in this handler for only one time. If I'll sort store - disappeared nodes showed up.
    And on 4.1.1 this code works flawless

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Redwood City
    Posts
    30,644
    Vote Rating
    61
      0  

    Default

    I can't understand you.

    You have a checked handler which removes the nodes. So that's why they disappear.

    What is this new information about sorting?
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  6. #6
    Sencha User
    Join Date
    Mar 2013
    Posts
    9
    Vote Rating
    4
      0  

    Default

    if I call tree.getStore().sort("text") /* or any other column */ in some cases it show disappeared nodes. But anyway it don't works fine - some nodes can doubles, on again sort trying it throw exception... I can't found workaround for some hours :-(

Posting Permissions

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