Skip to content

Commit b612598

Browse files
MKirovaMKirova
authored andcommitted
fix(igxHierarchicalGrid): Error is thrown on child grid initialization if Load On Demand is enabled and displayDensity is set.
1 parent 3f7f109 commit b612598

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
391391
}
392392
}
393393
const defaultItemSize = 'igxForItemSize';
394-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
394+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
395+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
395396
// handle default item size changed.
396397
this.initSizesCache(this.igxForOf);
397398
this._applyChanges();
@@ -1290,7 +1291,8 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
12901291
}
12911292
}
12921293
const defaultItemSize = 'igxForItemSize';
1293-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
1294+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
1295+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
12941296
// handle default item size changed.
12951297
this.initSizesCache(this.igxForOf);
12961298
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<button (click)='setterBindingChange()'>Set rowSelectable via binding</button>
22
<button (click)='setterChange()'>Set rowSelectable via setter on 1st row island</button>
3-
<igx-hierarchical-grid #grid1 [data]="remoteData" [primaryKey]="'CustomerID'" [autoGenerate]="false" [height]="'800px'" [width]="'100%'" #hGrid [emptyGridMessage]="''">
3+
<igx-hierarchical-grid #grid1 displayDensity="cosy" [data]="remoteData" [primaryKey]="'CustomerID'" [autoGenerate]="false" [height]="'800px'" [width]="'100%'" #hGrid [emptyGridMessage]="''">
44
<igx-column field="CustomerID"></igx-column>
55
<igx-column field="CompanyName"></igx-column>
66
<igx-column field="ContactName"></igx-column>

0 commit comments

Comments
 (0)