Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3641 in Sprint 27.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Boston
    Posts
    92
    Vote Rating
    5
    drb is on a distinguished road

      0  

    Default 2.1.0-rc2 NestedList Grouped and Grouper no longer work

    2.1.0-rc2 NestedList Grouped and Grouper no longer work


    Touch 2.1.0-rc2

    In 2.0.1.1 in the NestedList listchange event it is possible to set up a Grouped on the List and a Grouper on the list.getStore().

    This no longer works in 2.1.0-rc2

    Code:
    Ext.setup({
        onReady: function () {
    
            var data = {
                text: 'Groceries',
                items: [{
                    text: 'Drinks',
                    gp: 'D',
                    items: [{
                        text: 'Water',
                        gp: "W",
                        items: [{
                            text: 'Sparkling',
                            gp: "S",
                            leaf: true
                        }, {
                            text: 'Still',
                            gp: "S",
                            leaf: true
                        }, {
                            text: 'Deep',
                            gp: "D",
                            leaf: true
                        }, {
                            text: 'Muddy',
                            gp: "M",
                            leaf: true
                        }]
                    }, {
                        text: 'Ale',
                        gp: 'A',
                        leaf: true
                    }]
    
                }, {
                    text: 'Lager',
                    gp: "L",
                    leaf: true
                }]
            };
    
            Ext.define('ListItem', {
                extend: 'Ext.data.Model',
                config: {
                    fields: [{
                        name: 'text',
                        type: 'string'
                    }, {
                        name: 'gp',
                        type: 'string'
                    }]
                }
            });
    
            var store = Ext.create('Ext.data.TreeStore', {
                model: 'ListItem',
                defaultRootProperty: 'items',
                root: data
            });
    
            var nestedList = Ext.create('Ext.NestedList', {
                fullscreen: true,
                title: 'Groceries',
                displayField: 'text',
                store: store,
                listeners: {
                    listchange: function (nlist, list) {
                        var liststore = list.getStore();
                        liststore.setGrouper({
                            groupFn: function (record) {
                                return record.get("gp");
                            }
                        });
                        list.setGrouped(true);
                    }
                }
    
            });
        }
    });
    Thanks
    David

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,675
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


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