@@ -2222,6 +2222,54 @@ describe('IgxPivotGrid #pivotGrid', () => {
2222
2222
GridSelectionFunctions . verifyColumnSelected ( amountOfSale , false ) ;
2223
2223
GridSelectionFunctions . verifyColumnGroupSelected ( fixture , group , false ) ;
2224
2224
} ) ;
2225
+
2226
+ it ( 'should provide value formatter column data for second value' , ( ) => {
2227
+ let correctFirstColumnData = true ;
2228
+ let correctSecondColumnData = true ;
2229
+ const pivotGrid = fixture . componentInstance . pivotGrid ;
2230
+ pivotGrid . pivotConfiguration = {
2231
+ columns : fixture . componentInstance . pivotConfigHierarchy . columns ,
2232
+ rows : fixture . componentInstance . pivotConfigHierarchy . rows ,
2233
+ values : [
2234
+ {
2235
+ member : 'UnitsSold' ,
2236
+ aggregate : {
2237
+ aggregator : IgxPivotNumericAggregate . sum ,
2238
+ key : 'SUM' ,
2239
+ label : 'Sum'
2240
+ } ,
2241
+ enabled : true ,
2242
+ formatter : ( value , row , column ) => {
2243
+ if ( ! column || ! column . value || column . value . member !== 'UnitsSold' ) {
2244
+ correctFirstColumnData = false ;
2245
+ }
2246
+ return value ;
2247
+ }
2248
+ } ,
2249
+ {
2250
+ member : 'AmountOfSale' ,
2251
+ displayName : 'Amount of Sale' ,
2252
+ aggregate : {
2253
+ aggregator : IgxTotalSaleAggregate . totalSale ,
2254
+ key : 'TOTAL' ,
2255
+ label : 'Total'
2256
+ } ,
2257
+ enabled : true ,
2258
+ formatter : ( value , row , column ) => {
2259
+ if ( ! column || ! column . value || column . value . member !== 'AmountOfSale' ) {
2260
+ correctSecondColumnData = false ;
2261
+ }
2262
+ return value ;
2263
+ }
2264
+ }
2265
+ ]
2266
+ } ;
2267
+
2268
+ pivotGrid . width = '1500px' ;
2269
+ fixture . detectChanges ( ) ;
2270
+ expect ( correctFirstColumnData ) . toBeTruthy ( ) ;
2271
+ expect ( correctSecondColumnData ) . toBeTruthy ( ) ;
2272
+ } ) ;
2225
2273
} ) ;
2226
2274
2227
2275
describe ( 'IgxPivotGrid Resizing #pivotGrid' , ( ) => {
0 commit comments