File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
projects/igniteui-angular/src/lib/grids/pivot-grid Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1060,10 +1060,6 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
10601060 localeId ,
10611061 platform ,
10621062 _diTransactions ) ;
1063- onResourceChangeHandle ( this . destroy$ , ( ) => {
1064- // Since the columns are kinda static, due to assigning DisplayName on init, they need to be regenerated.
1065- this . setupColumns ( ) ;
1066- } , this ) ;
10671063 }
10681064
10691065 /**
@@ -1086,6 +1082,11 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
10861082 this . generateConfig ( ) ;
10871083 }
10881084 this . setupColumns ( ) ;
1085+ // Bind to onResourceChange after the columns have initialized the first time to avoid premature initialization.
1086+ onResourceChangeHandle ( this . destroy$ , ( ) => {
1087+ // Since the columns are kinda static, due to assigning DisplayName on init, they need to be regenerated.
1088+ this . setupColumns ( ) ;
1089+ } , this ) ;
10891090 } ) ;
10901091 if ( this . valueChipTemplateDirective ) {
10911092 this . valueChipTemplate = this . valueChipTemplateDirective . template ;
@@ -1102,6 +1103,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
11021103 Promise . resolve ( ) . then ( ( ) => {
11031104 super . ngAfterViewInit ( ) ;
11041105 } ) ;
1106+
11051107 }
11061108
11071109 /**
Original file line number Diff line number Diff line change @@ -46,10 +46,8 @@ describe('IgxPivotGrid #pivotGrid', () => {
4646 let fixture : ComponentFixture < IgxPivotGridTestBaseComponent > ;
4747
4848 beforeEach ( waitForAsync ( ( ) => {
49- getI18nManager ( ) . toggleEvents ( false ) ;
5049 fixture = TestBed . createComponent ( IgxPivotGridTestBaseComponent ) ;
5150 fixture . detectChanges ( ) ;
52- getI18nManager ( ) . toggleEvents ( true ) ;
5351 } ) ) ;
5452
5553 it ( 'should show empty template when there are no dimensions and values' , ( ) => {
You can’t perform that action at this time.
0 commit comments