Skip to content

Commit bd3264d

Browse files
MKirovaMayaKirova
authored andcommitted
fix(igxHierarchicalGrid): Error is thrown on child grid initialization if Load On Demand is enabled and displayDensity is set.
1 parent 78a519b commit bd3264d

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
@@ -423,7 +423,8 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
423423
}
424424
}
425425
const defaultItemSize = 'igxForItemSize';
426-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
426+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
427+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
427428
// handle default item size changed.
428429
this.initSizesCache(this.igxForOf);
429430
this._applyChanges();
@@ -1325,7 +1326,8 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
13251326
}
13261327
}
13271328
const defaultItemSize = 'igxForItemSize';
1328-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
1329+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
1330+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
13291331
// handle default item size changed.
13301332
this.initSizesCache(this.igxForOf);
13311333
}

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)