- constructor: function(config){
- Ext.apply(this, config);
- Ext.list.Sorter.superclass.constructor.call(this);
+<span id='Ext-util.Sorter-cfg-property'> /**
+</span> * @cfg {String} property The property to sort by. Required unless {@link #sorter} is provided
+ */
+
+<span id='Ext-util.Sorter-cfg-sorterFn'> /**
+</span> * @cfg {Function} sorterFn A specific sorter function to execute. Can be passed instead of {@link #property}
+ */
+
+<span id='Ext-util.Sorter-cfg-root'> /**
+</span> * @cfg {String} root Optional root property. This is mostly useful when sorting a Store, in which case we set the
+ * root to 'data' to make the filter pull the {@link #property} out of the data object of each item
+ */
+
+<span id='Ext-util.Sorter-cfg-transform'> /**
+</span> * @cfg {Function} transform A function that will be run on each value before
+ * it is compared in the sorter. The function will receive a single argument,
+ * the value.
+ */
+
+<span id='Ext-util.Sorter-cfg-direction'> /**
+</span> * @cfg {String} direction The direction to sort by. Defaults to ASC
+ */
+ direction: "ASC",
+
+ constructor: function(config) {
+ var me = this;
+
+ Ext.apply(me, config);
+
+ //<debug>
+ if (me.property == undefined && me.sorterFn == undefined) {
+ Ext.Error.raise("A Sorter requires either a property or a sorter function");
+ }
+ //</debug>
+
+ me.updateSortFunction();