@@ -45,7 +45,8 @@ import {
45
45
IgxCellHeaderTemplateDirective ,
46
46
IgxCellEditorTemplateDirective ,
47
47
IgxCollapsibleIndicatorTemplateDirective ,
48
- IgxFilterCellTemplateDirective
48
+ IgxFilterCellTemplateDirective ,
49
+ IgxCustomSummaryCellTemplateDirective
49
50
} from './templates.directive' ;
50
51
import { MRLResizeColumnInfo , MRLColumnSizeInfo , IColumnPipeArgs } from './interfaces' ;
51
52
import { DropPosition } from '../moving/moving.service' ;
@@ -837,6 +838,11 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
837
838
*/
838
839
@ContentChild ( IgxFilterCellTemplateDirective , { read : IgxFilterCellTemplateDirective } )
839
840
public filterCellTemplateDirective : IgxFilterCellTemplateDirective ;
841
+ /**
842
+ * @hidden
843
+ */
844
+ @ContentChild ( IgxCustomSummaryCellTemplateDirective , { read : IgxCustomSummaryCellTemplateDirective } )
845
+ public customSummaryCellTemplateDirective : IgxCustomSummaryCellTemplateDirective ;
840
846
/**
841
847
* @hidden
842
848
*/
@@ -857,7 +863,6 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
857
863
*/
858
864
@ContentChild ( IgxCollapsibleIndicatorTemplateDirective , { read : IgxCollapsibleIndicatorTemplateDirective , static : false } )
859
865
protected collapseIndicatorTemplate : IgxCollapsibleIndicatorTemplateDirective ;
860
-
861
866
/**
862
867
* @hidden
863
868
*/
@@ -1257,7 +1262,36 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
1257
1262
public set filterCellTemplate ( template : TemplateRef < any > ) {
1258
1263
this . _filterCellTemplate = template ;
1259
1264
}
1260
-
1265
+ /**
1266
+ * Returns a reference to the `customSummaryCellTemplate`.
1267
+ * ```typescript
1268
+ * let customSummaryCellTemplate = this.column.customSummaryCellTemplate;
1269
+ * ```
1270
+ *
1271
+ * @memberof IgxColumnComponent
1272
+ */
1273
+ @notifyChanges ( )
1274
+ @WatchColumnChanges ( )
1275
+ @Input ( )
1276
+ public get customSummaryCellTemplate ( ) : TemplateRef < any > {
1277
+ return this . _customSummaryCellTemplate ;
1278
+ }
1279
+ /**
1280
+ * Sets the custom summary cell template.
1281
+ * ```html
1282
+ * <ng-template igxCustomSummaryCell let-summaryResults>
1283
+ * {{ summaryResults[0].label }}
1284
+ * </ng-template>
1285
+ * ```
1286
+ * ```typescript
1287
+ *
1288
+ * ```
1289
+ *
1290
+ * @memberof IgxColumnComponent
1291
+ */
1292
+ public set customSummaryCellTemplate ( template : TemplateRef < any > ) {
1293
+ this . _customSummaryCellTemplate = template ;
1294
+ }
1261
1295
/**
1262
1296
* Gets the cells of the column.
1263
1297
* ```typescript
@@ -1588,6 +1622,10 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
1588
1622
* @hidden
1589
1623
*/
1590
1624
protected _filterCellTemplate : TemplateRef < any > ;
1625
+ /**
1626
+ * @hidden
1627
+ */
1628
+ protected _customSummaryCellTemplate : TemplateRef < any > ;
1591
1629
/**
1592
1630
* @hidden
1593
1631
*/
@@ -1699,6 +1737,9 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy {
1699
1737
if ( this . filterCellTemplateDirective ) {
1700
1738
this . _filterCellTemplate = this . filterCellTemplateDirective . template ;
1701
1739
}
1740
+ if ( this . customSummaryCellTemplateDirective ) {
1741
+ this . _customSummaryCellTemplate = this . customSummaryCellTemplateDirective . template ;
1742
+ }
1702
1743
if ( ! this . _columnPipeArgs . format ) {
1703
1744
this . _columnPipeArgs . format = this . dataType === GridColumnDataType . Time ?
1704
1745
DEFAULT_TIME_FORMAT : this . dataType === GridColumnDataType . DateTime ?
0 commit comments