Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-16592 in 6.0.1.
  1. #1
    Sencha Premium Member alexander.urban's Avatar
    Join Date
    Nov 2013
    Posts
    114
    Vote Rating
    8
    alexander.urban will become famous soon enough

      0  

    Default 4.2.3 Uncaught TypeError: Cannot read property 'isCollapsedPlaceholder' of undefined

    if(Ext.isArray(me.myButtons)) {
    Ext.Array.each(me.myButtons,function(item,i){
    groupHeaderTpl.push('<tpl if=\'name == '+i+'\'>'+Message.getValue(me.myButtons[i])+'</tpl>');
    });
    }
    me.selUserList = Ext.widget({
    xtype: 'gridpanel',

    itemId:'selUserList',
    columns: [{
    xtype: 'gridcolumn',
    dataIndex: 'name',
    text: Message.getValue('NAME'),
    flex: 1
    }],
    selModel: Ext.create('Ext.selection.RowModel', {
    mode: 'MULTI'
    }),
    features: [{
    ftype: 'grouping',
    collapsible: false,
    enableGroupingMenu: false,
    enableNoGroups: false,
    groupHeaderTpl: groupHeaderTpl
    }],
    height: 300,
    flex: 1,
    listeners:{
    render: me.onRenderSelUserList,
    scope: me
    }
    });

    This grid is then dynamically bound to a store, either with or without grouping feature:


    if(this.myButtons.length==1)
    var tmpStore = new Ext.create('Ext.data.Store', {
    fields: ['id','name','type']
    });
    else
    var tmpStore = new Ext.create('Ext.data.Store', {
    fields: ['id','name','type'],
    groupField: 'type'
    });
    me.reconfigure(tmpStore);


    If that store does not have grouping feature enabled, everything works fine. But if it has grouping feature enabled, strange things happen: When I add the first record to the store, it is rendered in the grid, but no grouping is rendered. When I add the second element to the store, it is rendered twice - both below the first one. Every subsequent record will be rendered twice, with both renderings between the two rendered instances of the previous record.

    When I now move over the lower of the two renderings of any record, I get the error from the title:

    app.js:148477 Uncaught TypeError: Cannot read property 'isCollapsedPlaceholder' of undefined
    app.js:148477 Ext.define.indexOf
    app.js:141145 Ext.define.indexInStore
    app.js:126608 Ext.define.processUIEvent

    The store contains 4 records, I checked that, but 7 entries are shown in the grid, and the lower 3 give the mentioned error message when moving over them with the mouse.

    I can get the desired behaviour by changing back to 4.2.2.
    But then I have a problem with EXTJS-11231, fixed in 4.2.3.

    Did I overlook any breaking changes to grouping grid rendering in 4.2.3?

  2. #2
    Sencha Premium Member alexander.urban's Avatar
    Join Date
    Nov 2013
    Posts
    114
    Vote Rating
    8
    alexander.urban will become famous soon enough

      0  

    Default

    I'd like to point out that the old 4.2.2 code contains in GroupStore.js:

    Code:
    onAdd: function(store, records, startIndex) {
        this.processStore(this.store);
        this.fireEvent('refresh', this);
    },
    which at least works correctly in the way that every item is in the list only once, while the new 4.2.3 contains

    Code:
    onAdd: function(store, records, startIndex) {
        this.processStore(this.store);
        // Use indexOf to find the index of the records added.
        // It will be different in this store, and this store is what the View sees.
        this.fireEvent('replace', this, this.indexOf(records[0]), [], records);
    },
    does not work correctly in that respect. I have to yet find out where that replace/refresh is listened to. Could anyone enlighten me?

    And then I would have to find out why the group headers are not displayed.

  3. #3
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    6,609
    Vote Rating
    168
    Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold

      0  

    Default

    Thanks for the report. Can you please post a test case which reproduces the issue?
    https://fiddle.sencha.com/#home
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

  4. #4
    Sencha Premium Member alexander.urban's Avatar
    Join Date
    Nov 2013
    Posts
    114
    Vote Rating
    8
    alexander.urban will become famous soon enough

      0  

    Default

    https://fiddle.sencha.com/#fiddle/g0b only partly reproduces the issue in 5.1.0 (entries are displayed twice, but group headers are shown and no error is logged to console). I guess that you would see all problems when using 4.2.3 instead.

  5. #5
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    6,609
    Vote Rating
    168
    Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold Gary Schlosberg is a splendid one to behold

      0  

    Default

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

    For future, if you log into Fiddle with your (Premium) forum credentials, you can see support releases such as 4.2.3.

Thread Participants: 1