@@ -23,7 +23,8 @@ import {
23
23
ViewContainerRef ,
24
24
Injector ,
25
25
NgModuleRef ,
26
- ApplicationRef
26
+ ApplicationRef ,
27
+ ContentChild
27
28
} from '@angular/core' ;
28
29
import { IgxGridBaseDirective } from '../grid-base.directive' ;
29
30
import { IgxFilteringService } from '../filtering/grid-filtering.service' ;
@@ -71,6 +72,7 @@ import { ISortingExpression, SortingDirection } from '../../data-operations/sort
71
72
import { DefaultPivotSortingStrategy } from '../../data-operations/pivot-sort-strategy' ;
72
73
import { PivotSortUtil } from './pivot-sort-util' ;
73
74
import { FilterUtil , IFilteringStrategy } from '../../data-operations/filtering-strategy' ;
75
+ import { IgxPivotValueChipTemplateDirective } from './pivot-grid.directives' ;
74
76
75
77
let NEXT_ID = 0 ;
76
78
const MINIMUM_COLUMN_WIDTH = 200 ;
@@ -173,6 +175,23 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
173
175
@ViewChild ( IgxPivotHeaderRowComponent , { static : true } )
174
176
public theadRow : IgxPivotHeaderRowComponent ;
175
177
178
+ /**
179
+ * @hidden @internal
180
+ */
181
+ @ContentChild ( IgxPivotValueChipTemplateDirective , { read : IgxPivotValueChipTemplateDirective } )
182
+ protected valueChipTemplateDirective : IgxPivotValueChipTemplateDirective ;
183
+
184
+ /**
185
+ * Gets/Sets a custom template for the value chips.
186
+ *
187
+ * @example
188
+ * ```html
189
+ * <igx-pivot-grid [valueChipTemplate]="myTemplate"><igx-pivot-grid>
190
+ * ```
191
+ */
192
+ @Input ( )
193
+ public valueChipTemplate : TemplateRef < any > ;
194
+
176
195
@Input ( )
177
196
/**
178
197
* Gets/Sets the pivot configuration with all related dimensions and values.
@@ -928,6 +947,9 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
928
947
Promise . resolve ( ) . then ( ( ) => {
929
948
this . setupColumns ( ) ;
930
949
} ) ;
950
+ if ( this . valueChipTemplateDirective ) {
951
+ this . valueChipTemplate = this . valueChipTemplateDirective . template ;
952
+ }
931
953
}
932
954
933
955
/**
0 commit comments