Skip to content

Commit d651ddb

Browse files
committed
fix: DH-19138: Determine Totals Column Name by Num Aggs Per Column
1 parent 15c8cfe commit d651ddb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/iris-grid/src/IrisGridTableModelTemplate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,13 +1011,13 @@ class IrisGridTableModelTemplate<
10111011
const tableColumn = this.columns[column];
10121012

10131013
// Find the matching totals table column for the operation
1014-
// When there are multiple aggregations, the column name will be the original name of the column with the operation appended afterward
1015-
// When the the operation is the default operation OR there is only one operation, then the totals column name is just the original column name
1014+
// When there are multiple aggregations for the column, the column name will be the original name of the column with the operation appended afterward
1015+
// When the the operation is the default operation OR there is only one operation for the column, then the totals column name is just the original column name
10161016
const totalsColumn = this.totalsTable?.columns.find(
10171017
col =>
10181018
col.name === `${tableColumn.name}__${operation}` ||
10191019
((operation === defaultOperation ||
1020-
this.totals?.operationOrder.length === 1) &&
1020+
this.totals?.operationMap[col.name]?.length === 1) &&
10211021
col.name === tableColumn.name)
10221022
);
10231023
if (totalsColumn != null) {

0 commit comments

Comments
 (0)