Skip to content

Commit

Permalink
chore(*): more code optimizations #3310
Browse files Browse the repository at this point in the history
  • Loading branch information
SAndreeva committed Jan 4, 2019
1 parent 32f42b3 commit 9343de0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
></div>
</ng-container>
<ng-container *ngIf="pinnedColumns.length > 0">
<igx-grid-summary-cell *ngFor="let col of notGroups(pinnedColumns)" [column]="col" [firstCellIndentation]="firstCellIndentation" [rowIndex]="index" [summaryResults]="getColumnSummaries(col.field)" [hasSummary]="col.hasSummary" [density]="gridDensity" [style.min-height.px]="minHeight"></igx-grid-summary-cell>
<igx-grid-summary-cell *ngFor="let col of notGroups(pinnedColumns)" [column]="col" [firstCellIndentation]="firstCellIndentation" [rowIndex]="index" [summaryResults]="getColumnSummaries(col.field)" [hasSummary]="col.hasSummary" [density]="grid.displayDensity" [style.min-height.px]="minHeight"></igx-grid-summary-cell>
</ng-container>
<ng-template igxGridFor let-col [igxGridForOf]="notGroups(unpinnedColumns)" [igxForScrollContainer]="grid.parentVirtDir" let-colIndex="index" [igxForScrollOrientation]="'horizontal'" [igxForContainerSize]="grid.unpinnedWidth" [igxForTrackBy]="grid.trackColumnChanges" #igxDirRef>
<igx-grid-summary-cell [column]="col" [rowIndex]="index" [firstCellIndentation]="firstCellIndentation" [summaryResults]="getColumnSummaries(col.field)" [hasSummary]="col.hasSummary" [density]="gridDensity" [style.min-height.px]="minHeight"></igx-grid-summary-cell>
<igx-grid-summary-cell [column]="col" [rowIndex]="index" [firstCellIndentation]="firstCellIndentation" [summaryResults]="getColumnSummaries(col.field)" [hasSummary]="col.hasSummary" [density]="grid.displayDensity" [style.min-height.px]="minHeight"></igx-grid-summary-cell>
</ng-template>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ export class IgxSummaryRowComponent implements DoCheck {
return this.element.nativeElement;
}

get gridDensity(): string {
return this.grid.displayDensity || DisplayDensity.comfortable;
}

public getColumnSummaries(columnName) {
if (!this.summaries.get(columnName)) {
return [];
Expand Down

0 comments on commit 9343de0

Please sign in to comment.