Hybrid View

    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
    2
    Brainenjii is on a distinguished road

      1  

    Default Tree Error in ExtJS 4.2-beta

    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
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      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
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Is this not just your checkchange listener removing all child nodes from any node which has its checked status changed?

  4. #4
    Sencha User
    Join Date
    Mar 2013
    Posts
    9
    Vote Rating
    2
    Brainenjii is on a distinguished road

      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
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      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?

  6. #6
    Sencha User
    Join Date
    Mar 2013
    Posts
    9
    Vote Rating
    2
    Brainenjii is on a distinguished road

      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 :-(

Thread Participants: 1