Skip to content

Commit 7481ec0

Browse files
committed
chore(*): updating sample and fixing default height
1 parent 21b73a3 commit 7481ec0

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,14 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
285285
protected calcGridHeadRow() {
286286
}
287287

288+
/**
289+
* @hidden @internal
290+
*/
291+
protected getDataBasedBodyHeight(): number {
292+
const dvl = this.dataView?.length || 0;
293+
return dvl < this._defaultTargetRecordNumber ? 0 : this.defaultTargetBodyHeight;
294+
}
295+
288296
protected get hasMultipleValues() {
289297
return this.values.length > 1;
290298
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div class="sample-column">
2-
<igx-pivot-grid #grid1 [data]="origData" [width]="'1200px'" [height]="'100%'" [pivotConfiguration]="pivotConfigHierarchy">
2+
<igx-pivot-grid #grid1 [data]="origData" [width]="'100%'" [height]="'100%'" [pivotConfiguration]="pivotConfigHierarchy">
33
</igx-pivot-grid>
44
</div>

src/app/pivot-grid/pivot-grid.sample.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
.sample-column {
2+
height: calc(100vh - 106px);
3+
margin: 0 0 0 0 !important;
4+
}
5+
16
:host ::ng-deep {
27
.upFont {
38
color: lightgreen;

0 commit comments

Comments
 (0)