-
19 Dec 2011 6:14 AM #11
Any update on this? I've been stuck and I haven't found a work around
-
19 Dec 2011 6:07 PM #12
For what it's worth (from a sencha noob :-) ), I'm having this problem too, and when I include data inline in the store, I can keep the 'grouped:true' property in the list, and it loads and groups fine. But when I use a proxy in the store, I have to comment out the 'grouped' property in the list, as fullthrottle mentioned, in order for my list to display (ungrouped, obviously).
When I use a proxy and have "grouped:true" in the list, I just see a 'loading' indicator, and the: " null is not an object (evaluating Ext.get(b).insertFirst) " error.
I love sencha so far, BTW. By far the best mobile web library out there. Thanks for your help!
-
20 Dec 2011 10:36 AM #13Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Can you try this override:
Code:Ext.override(Ext.dataview.List, { findGroupHeaderIndices: function() { if (!this.getGrouped()) { return []; } var me = this, store = me.getStore(); if (!store) { return []; } var groups = store.getGroups(), groupLn = groups.length, items = me.getViewItems(), newHeaderItems = [], footerClsShortCache = me.footerClsShortCache, i, firstGroupedRecord, index, item, bottomItem; me.doRemoveHeaders(); me.doRemoveFooterCls(); if (items.length) { for (i = 0; i < groupLn; i++) { firstGroupedRecord = groups[i].children[0]; index = store.indexOf(firstGroupedRecord); item = items[index]; me.doAddHeader(item, store.getGroupString(firstGroupedRecord)); // Skip footer before the first Header if (i) { Ext.fly(item.previousSibling).addCls(footerClsShortCache); } newHeaderItems.push(index); } bottomItem = Math.max(items.length - 2, 0); Ext.fly(items[bottomItem]).addCls(footerClsShortCache); } return newHeaderItems; } });
-
20 Dec 2011 11:15 AM #14
When adding your code the first error I get is
Uncaught TypeError: Object [object Object] has no method 'doRemoveHeaders'
because me.doRemoveHeaders fails, seems like although me is the correct List object it doesn't have that function
When I comment out the doRemoveHeaders and Footers lines the list loads but does not group anything. And when scrolling it seems to lag. If I hit f12 in chrome to debug it I then see the grouped Headers, which it rendered two of and it seems to work better.
Hope this helps!
-
20 Dec 2011 7:30 PM #15
I had the same problem: that 'doRemoveHeaders' was not a function. 'me' was defined as the list object, so that seems ok.
-
24 Dec 2011 5:00 AM #16
Jamie,
I had the same issue and your override resolves the problem. Thanks a lot.
-
25 Dec 2011 12:33 PM #17
Solved
Solved
Thanks. I was experiencing the same issue and the override solved the problem.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1233
in
2.0.


Reply With Quote