-
25 Sep 2012 7:37 PM #1
Store::sort() method may be improved a bit
Store::sort() method may be improved a bit
The extjs version I'm talking about is 4.1.2a
Currently the sort method of Extjs.data.Store looks like
it can be reduced to something a bit more readable and short:Code:sort: function() { var me = this, prefetchData = me.pageMap; if (me.buffered) { if (me.remoteSort) { prefetchData.clear(); me.callParent(arguments); } else { me.callParent(arguments); } } else { me.callParent(arguments); } },
Code:sort: function() { var me = this, prefetchData = me.pageMap; if (me.buffered && me.remoteSort) { prefetchData.clear(); } me.callParent(arguments); },
-
25 Sep 2012 9:32 PM #2
Not really a bug, but yeah, that code certainly isn't great. Will fix it up, cheers.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
26 Sep 2012 12:06 PM #3
Store.sort inherits form AbstractStore, but AbstractStore doesn't have the sort method, so why are we calling callParent?
-
26 Sep 2012 1:16 PM #4
It does, it's mixed in by sortable.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
26 Sep 2012 1:26 PM #5
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote
