agregar nueva clase de subtotal, se agregará en vcomponents, sub total de total fila

This commit is contained in:
dehernandezm 2025-02-14 10:51:46 -06:00
parent dba0d7970d
commit 33314359bf
3 changed files with 5 additions and 7 deletions

View File

@ -436,9 +436,7 @@ function makeRenderer() {
null,
rowKeysSub.map(function (rowKey, i) {
var isSubTotal = rowKey.includes('[:sub-total:]');
var totalAggregator = isSubTotal ? { value: function value() {
return 0;
} } : pivotData.getAggregator(rowKey, []);
var totalAggregator = getSubAggregator(rowKey, []);
return _react2.default.createElement(
'tr',
{ key: 'rowKeyRow' + i + ' ' + (isSubTotal ? ' bg-sky-50 ' : '') },
@ -464,7 +462,7 @@ function makeRenderer() {
return _react2.default.createElement(
'td',
{
className: 'pvtVal ' + getValueClass(aggregator),
className: 'pvtVal ' + (isSubTotal ? 'pvtSubTotal' : ''),
key: 'pvtVal' + i + '-' + j,
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
style: valueCellColors(rowKey, colKey, aggregator.value())
@ -475,7 +473,7 @@ function makeRenderer() {
_react2.default.createElement(
'td',
{
className: 'pvtTotal',
className: ' pvtTotal ' + (isSubTotal ? 'pvtSubTotal' : '') + ' ',
onClick: getClickHandler && getClickHandler(totalAggregator.value(), rowKey, [null]),
style: colTotalColors(totalAggregator.value())
},

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "v-react-pivottable",
"version": "0.11.57",
"version": "0.11.58",
"description": "A React-based pivot table",
"main": "PivotTableUI.js",
"files": [