You found a bug! We've classified it as
EXTJS-15067
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Sencha User
Issue with Desc Order Grouping on numeric field
Tested on Ext JS 4.2.1 , 4.2.2
Steps:
1. Summary for class:1 group won't come &
2. On editing any student record of the group, It will throw an error and you won't be able to edit the students record in that group.
Cause: (found on Debugging)
The problem lies with Store's constructGroups() because while adding group in MixedCollection of groups, it first calls "get" method with key value (which is numeric in our case).
And get method implementation for AbstractMixedCollection is, if map doesn't find any instance with numeric key,then return an instance at that index instead. That's why constructGroups method doesn't add all instances of groups.
So basically when numeric group values are sorted in DESC order, MixedCollection returns group at that index instead of returning null but for ASC order, there won't be any instance at that index as well, so it works fine!
Code:
//AbstractMixedCollection get method implementation
get : function(key) {
var me = this,
mk = me.map[key],
item = mk !== undefined ? mk : (typeof key == 'number') ? me.items[key] : undefined;
return typeof item != 'function' || me.allowFunctions ? item : null;
},
-
Thanks for the report! I have opened a bug in our bug tracker.
-
Sencha User
Any Workaround?
Hi Gary,
As this issue has been fixed in 4.2.3, You can close this bug and if possible please provide some workaround/override for this? 
Thanks
Yogesh