dtable-statistic 5.0.42-alpha.32 → 5.0.42-alpha.34

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.
@@ -592,6 +592,7 @@ const updatedOneDimensionToTable = _ref5 => {
592
592
  columnMap[key] = (0, _dtableUtils.getTableColumnByName)(updateTable, column.name);
593
593
  }
594
594
  });
595
+ columnMap['total'] = (0, _dtableUtils.getTableColumnByName)(updateTable, _reactIntlUniversal.default.get('Total'));
595
596
 
596
597
  // updated rows
597
598
  const {
@@ -624,11 +625,14 @@ const updatedOneDimensionToTable = _ref5 => {
624
625
  });
625
626
 
626
627
  // total column
627
- console.log('row', row);
628
- console.log('item', item);
629
- console.log('rowTotal', rowTotal);
630
- updateRow[_reactIntlUniversal.default.get('Total')] = rowTotal;
631
- oldRow[_reactIntlUniversal.default.get('Total')] = rowTotal;
628
+ const column = columnMap['total'];
629
+ if (column) {
630
+ console.log('column', column);
631
+ console.log('row', row);
632
+ console.log('item', item);
633
+ updateRow[column.key] = rowTotal;
634
+ oldRow[column.key] = row[column.key];
635
+ }
632
636
  if (Object.keys(updateRow).length > 0) {
633
637
  console.log(222);
634
638
  const rowId = row._id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-statistic",
3
- "version": "5.0.42-alpha.32",
3
+ "version": "5.0.42-alpha.34",
4
4
  "description": "statistics",
5
5
  "main": "dist/dtable-statistic.js",
6
6
  "author": "seafile",