Skip to content

Commit d468cff

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 8f716a4 commit d468cff

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
@@ -473,7 +473,8 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
473473
}
474474
}
475475
const defaultItemSize = 'igxForItemSize';
476-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
476+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
477+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
477478
// handle default item size changed.
478479
this.initSizesCache(this.igxForOf);
479480
this._applyChanges();
@@ -1375,7 +1376,8 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
13751376
}
13761377
}
13771378
const defaultItemSize = 'igxForItemSize';
1378-
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange && this.igxForScrollOrientation === 'vertical') {
1379+
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&
1380+
this.igxForScrollOrientation === 'vertical' && this.igxForOf) {
13791381
// handle default item size changed.
13801382
this.initSizesCache(this.igxForOf);
13811383
}

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" [isLoading]="true" [primaryKey]="'CustomerID'" [autoGenerate]="false" [height]="'800px'" [width]="'100%'" #hGrid [emptyGridMessage]="''">
3+
<igx-hierarchical-grid #grid1 displayDensity="cosy" [data]="remoteData" [isLoading]="true" [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)