flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject git commit: [flex-sdk] [refs/heads/develop] - FLEX-33159 FLEX-33158 Fix addSortField method so it preserves custom sorting and keeps internal sort fields in sync
Date Mon, 23 Sep 2013 05:05:44 GMT
Updated Branches:
  refs/heads/develop d1b369a59 -> d8fdfb53a


FLEX-33159 FLEX-33158 Fix addSortField method so it preserves custom sorting and keeps internal
sort fields in sync


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/d8fdfb53
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/d8fdfb53
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/d8fdfb53

Branch: refs/heads/develop
Commit: d8fdfb53a2f78fcf11b8c3b9a4d7c4d1f387e049
Parents: d1b369a
Author: Justin Mclean <jmclean@apache.org>
Authored: Mon Sep 23 14:20:18 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Mon Sep 23 14:20:18 2013 +1000

----------------------------------------------------------------------
 .../src/mx/controls/AdvancedDataGridBaseEx.as        | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d8fdfb53/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
index 0dc81d8..9ded0e3 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -6091,11 +6091,8 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
         if (!column.sortable)
             return;
 
-         var headerInfo:AdvancedDataGridHeaderInfo = getHeaderInfo(column);
-         if(headerInfo && headerInfo.internalLabelFunction != null && column.sortCompareFunction
== null)
-             return;
-
          var desc:Boolean = column.sortDescending;
+		 var fields:Array;
          
          var singleColumnSort:Boolean = false;
          if (!collection.sort || !collection.sort.fields)
@@ -6129,14 +6126,18 @@ public class AdvancedDataGridBaseEx extends AdvancedDataGridBase implements
IIME
         }
 
         column.sortDescending = desc;
-        var field:ISortField = new SortField(columnName); // name
+        var field:ISortField = new SortField(columnName);
         field.sortCompareType = column.sortCompareType;
         field.descending = desc;
         
-//        field.name = column.dataField;
         if (column.sortCompareFunction != null)
             field.compareFunction = column.sortCompareFunction;
-        collection.sort.fields.push(field);
+		
+		fields = collection.sort.fields;
+		if (fields == null)
+			fields = [];
+		fields.push(field);
+		collection.sort.fields = fields;
     }
 
     /**


Mime
View raw message