File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 449
449
* <br/>Defaults to true
450
450
*/
451
451
gridOptions . groupingShowCounts = gridOptions . groupingShowCounts !== false ;
452
+
453
+ /**
454
+ * @ngdoc object
455
+ * @name groupingNullLabel
456
+ * @propertyOf ui.grid.grouping.api:GridOptions
457
+ * @description The string to use for the grouping header row label on rows which contain a null or undefined value in the grouped column.
458
+ * <br/>Defaults to "Null"
459
+ */
460
+ gridOptions . groupingNullLabel = gridOptions . groupingNullLabel || 'Null' ;
452
461
} ,
453
462
454
463
1140
1149
var updateProcessingState = function ( groupFieldState , stateIndex ) {
1141
1150
var fieldValue = grid . getCellValue ( row , groupFieldState . col ) ;
1142
1151
if ( typeof ( fieldValue ) === 'undefined' || fieldValue === null ) {
1143
- return ;
1152
+ fieldValue = grid . options . groupingNullLabel ;
1144
1153
}
1145
1154
1146
1155
if ( ! row . visible ) {
1287
1296
1288
1297
// TODO: can't just use entity like this, have to use get cell value, need col for that
1289
1298
var newValue = grid . getCellValue ( renderableRows [ rowIndex ] , col ) ;
1299
+ if ( typeof ( newValue ) === 'undefined' || newValue === null ) {
1300
+ newValue = grid . options . groupingNullLabel ;
1301
+ }
1290
1302
headerRow . entity [ fieldName ] = newValue ;
1291
1303
headerRow . groupLevel = stateIndex ;
1292
1304
headerRow . groupHeader = true ;
You can’t perform that action at this time.
0 commit comments