-
29 Jun 2012 1:36 PM #1
Ext.data.Store group bug
Ext.data.Store group bug
Next simple bug.
File: Store.js
Method: group: function(groupers, direction)
Parameter direction is optional. Why you force set direction even it can be null.
After disable and enable grouping, It raises bad sorting.
Finally "groupDir" is useless.
Code:group: function(groupers, direction) { var me = this, hasNew = false, grouper, newGroupers; if (Ext.isArray(groupers)) { newGroupers = groupers; } else if (Ext.isObject(groupers)) { newGroupers = [groupers]; } else if (Ext.isString(groupers)) { grouper = me.groupers.get(groupers); if (!grouper) { grouper = { property : groupers, direction: direction <-- why without checking if null then set from "me.groupDir" }; newGroupers = [grouper]; } else if (direction === undefined) { grouper.toggle(); } else { grouper.setDirection(direction); } } if (newGroupers && newGroupers.length) { hasNew = true; newGroupers = me.decodeGroupers(newGroupers); me.groupers.clear(); me.groupers.addAll(newGroupers); } if (me.remoteGroup) { me.load({ scope: me, callback: me.fireGroupChange }); } else { // need to explicitly force a sort if we have groupers me.sort(null, null, null, hasNew); me.fireGroupChange(); } },
You found a bug! We've classified it as
EXTJSIV-6692
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote