Skip to content

Commit

Permalink
refactor: add grid object to the GroupTotalFormatters when exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 7, 2020
1 parent 55913b8 commit e4fe715
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/excel-export/src/excelExport.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,10 @@ export class ExcelExportService implements BaseExcelExportService {

// if there's a exportCustomGroupTotalsFormatter or groupTotalsFormatter, we will re-run it to get the exact same output as what is shown in UI
if (columnDef.exportCustomGroupTotalsFormatter) {
itemData = columnDef.exportCustomGroupTotalsFormatter(itemObj, columnDef);
itemData = columnDef.exportCustomGroupTotalsFormatter(itemObj, columnDef, this._grid);
} else {
if (columnDef.groupTotalsFormatter) {
itemData = columnDef.groupTotalsFormatter(itemObj, columnDef);
itemData = columnDef.groupTotalsFormatter(itemObj, columnDef, this._grid);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/text-export/src/textExport.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export class TextExportService implements BaseTextExportService {

// if there's a groupTotalsFormatter, we will re-run it to get the exact same output as what is shown in UI
if (columnDef.groupTotalsFormatter) {
itemData = columnDef.groupTotalsFormatter(itemObj, columnDef);
itemData = columnDef.groupTotalsFormatter(itemObj, columnDef, this._grid);
}

// does the user want to sanitize the output data (remove HTML tags)?
Expand Down

0 comments on commit e4fe715

Please sign in to comment.