Skip to content

Commit af413fd

Browse files
authored
Merge branch 'master' into mvenkov/fix-overlay-position
2 parents 58dccd3 + 3145e98 commit af413fd

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

projects/igniteui-angular/src/lib/directives/template-outlet/template_outlet.directive.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ export class IgxTemplateOutletDirective implements OnChanges {
107107
this._viewContainerRef.insert(view, 0);
108108
this._updateExistingContext(this.igxTemplateOutletContext);
109109
this.onViewMoved.emit({ owner: this, view: this._viewRef, context: this.igxTemplateOutletContext });
110+
} else {
111+
this._updateExistingContext(this.igxTemplateOutletContext);
110112
}
111113
}
112114
private _useCachedView() {

src/app/hierarchical-grid/hierarchical-grid.sample.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ <h4 class="sample-title">Sample three</h4>
109109
<h4 class="sample-title">Sample 4</h4>
110110
<div class="sample-actions">
111111
<button igxButton="raised" (click)='LoadMoreColumns()'>Change columns runtime</button>
112+
<button igxButton="raised" (click)='changeData()'>Change data runtime</button>
112113
</div>
113-
<igx-hierarchical-grid [data]="localData" [autoGenerate]="false" [height]="'600px'" [width]="'800px'" #hGrid2>
114+
<igx-hierarchical-grid [data]="localData1" [autoGenerate]="false" [height]="'600px'" [width]="'800px'" #hGrid2>
114115
<igx-column field="ID" [resizable]="true" [pinned]="true" [filterable]='true'></igx-column>
115116
<igx-column field="ChildLevels" [resizable]="true" [groupable]='true'></igx-column>
116117
<igx-column field="ProductName" hasSummary='true'></igx-column>

src/app/hierarchical-grid/hierarchical-grid.sample.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import {
1313
})
1414
export class HierarchicalGridSampleComponent {
1515
localData = [];
16+
localData1 = [];
17+
data1 = [];
18+
data2 = [];
1619
isRowSelectable = false;
1720
firstLevelExpanded = false;
1821
rootExpanded = false;
@@ -48,6 +51,9 @@ export class HierarchicalGridSampleComponent {
4851
{ label: 'comfortable', selected: this.density === 'comfortable', togglable: true }
4952
];
5053
this.localData = this.generateDataUneven(100, 3);
54+
this.data1 = this.localData.slice(0, 10);
55+
this.data2 = this.localData.slice(10, 20);
56+
this.localData1 = this.data1;
5157
this.localData[0].hasChild = false;
5258
this.localData[1].hasChild = false;
5359
this.localData[2].childData[0].hasChild = false;
@@ -139,4 +145,13 @@ export class HierarchicalGridSampleComponent {
139145
this.columns = ['Col1', 'Col2', 'Col3'];
140146
this.childColumns = ['ChildCol1', 'ChildCol2'];
141147
}
148+
149+
public changeData() {
150+
debugger;
151+
if (this.localData1 === this.data1) {
152+
this.localData1 = this.data2;
153+
} else {
154+
this.localData1 = this.data1;
155+
}
156+
}
142157
}

0 commit comments

Comments
 (0)