Skip to content

Commit

Permalink
feat(igx-grid): Take locale into account for summary' values, #3455
Browse files Browse the repository at this point in the history
  • Loading branch information
sstoyanovIG committed Dec 20, 2018
1 parent abcd9ec commit ea77fd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="{{itemClass}}" [style.height.px]="summaryItemHeight">
<span class="igx-grid-summary__label" title="{{ summary.label }}">{{ translateSummary(summary) }}</span>
<span class="igx-grid-summary__result" title="{{ summary.summaryResult }}">
{{ column.dataType === 'number' ? (summary.summaryResult | igxdecimal) : column.dataType === 'date' ? (summary.summaryResult | igxdate) : (summary.summaryResult) }}
{{ column.dataType === 'number' ? (summary.summaryResult | igxdecimal: grid.locale) : column.dataType === 'date' ? (summary.summaryResult | igxdate: grid.locale) : (summary.summaryResult) }}
</span>
</div>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export class IgxGridSummaryComponent implements DoCheck {
return this.gridAPI.get(this.gridID).resourceStrings[`igx_grid_summary_${summary.key}`] || summary.label;
}

public get grid() {
return (this.column.grid as any);
}

get resolveSummaries(): any[] {
if (this.fieldName) {
const field = this.fieldName;
Expand Down

0 comments on commit ea77fd4

Please sign in to comment.