File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1050
1050
newDisplayValue = grid . options . groupingNullLabel ;
1051
1051
}
1052
1052
1053
+ var getKeyAsValueForCacheMap = function ( key ) {
1054
+ if ( angular . isObject ( key ) ) {
1055
+ return JSON . stringify ( key ) ;
1056
+ } else {
1057
+ return key ;
1058
+ }
1059
+ } ;
1060
+
1053
1061
var cacheItem = grid . grouping . oldGroupingHeaderCache ;
1054
1062
for ( var i = 0 ; i < stateIndex ; i ++ ) {
1055
- if ( cacheItem && cacheItem [ processingState [ i ] . currentValue ] ) {
1056
- cacheItem = cacheItem [ processingState [ i ] . currentValue ] . children ;
1063
+ if ( cacheItem && cacheItem [ getKeyAsValueForCacheMap ( processingState [ i ] . currentValue ) ] ) {
1064
+ cacheItem = cacheItem [ getKeyAsValueForCacheMap ( processingState [ i ] . currentValue ) ] . children ;
1057
1065
}
1058
1066
}
1059
1067
1060
1068
var headerRow ;
1061
- if ( cacheItem && cacheItem [ newValue ] ) {
1062
- headerRow = cacheItem [ newValue ] . row ;
1069
+ if ( cacheItem && cacheItem [ getKeyAsValueForCacheMap ( newValue ) ] ) {
1070
+ headerRow = cacheItem [ getKeyAsValueForCacheMap ( newValue ) ] . row ;
1063
1071
headerRow . entity = { } ;
1064
1072
} else {
1065
1073
headerRow = new GridRow ( { } , null , grid ) ;
1086
1094
// add our new header row to the cache
1087
1095
cacheItem = grid . grouping . groupingHeaderCache ;
1088
1096
for ( i = 0 ; i < stateIndex ; i ++ ) {
1089
- cacheItem = cacheItem [ processingState [ i ] . currentValue ] . children ;
1097
+ cacheItem = cacheItem [ getKeyAsValueForCacheMap ( processingState [ i ] . currentValue ) ] . children ;
1090
1098
}
1091
- cacheItem [ newValue ] = { row : headerRow , children : { } } ;
1099
+ cacheItem [ getKeyAsValueForCacheMap ( newValue ) ] = { row : headerRow , children : { } } ;
1092
1100
} ,
1093
1101
1094
1102
You can’t perform that action at this time.
0 commit comments