dtable-statistic 5.0.42-alpha.12 → 5.0.42-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -482,7 +482,8 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
482
482
|
const {
|
|
483
483
|
pivotResult,
|
|
484
484
|
groupbyColumn,
|
|
485
|
-
statisticTableColumns
|
|
485
|
+
statisticTableColumns,
|
|
486
|
+
summaryColumn
|
|
486
487
|
} = statisticalResult;
|
|
487
488
|
if (!groupbyColumn) return {};
|
|
488
489
|
const nameColumn = (0, _dtableUtils.getTableColumnByName)(updateTable, groupbyColumn.name);
|
|
@@ -526,10 +527,11 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
526
527
|
updateRow[totalColumn.key] = validTotalCellValue;
|
|
527
528
|
oldRow[totalColumn.key] = row[totalColumn.key];
|
|
528
529
|
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
530
|
+
const validSummaryCellValue = getValidValueForColumn(summaryColumn, total.total);
|
|
531
|
+
if (summaryColumn && (0, _cellValue.isCellValueChanged)(row[summaryColumn.key], validSummaryCellValue, summaryColumn.type)) {
|
|
532
|
+
updateRow[summaryColumn.key] = validSummaryCellValue;
|
|
533
|
+
oldRow[summaryColumn.key] = row[summaryColumn.key];
|
|
534
|
+
}
|
|
533
535
|
if (Object.keys(updateRow).length > 0) {
|
|
534
536
|
const rowId = row._id;
|
|
535
537
|
rowIds.push(rowId);
|
|
@@ -543,6 +545,9 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
543
545
|
if (totalColumn) {
|
|
544
546
|
newRow[totalColumn.key] = getValidValueForColumn(totalColumn, total.total);
|
|
545
547
|
}
|
|
548
|
+
if (summaryColumn) {
|
|
549
|
+
newRow[summaryColumn.key] = getValidValueForColumn(summaryColumn, total.total);
|
|
550
|
+
}
|
|
546
551
|
newRows.push(newRow);
|
|
547
552
|
}
|
|
548
553
|
});
|