agregar console log test para agregar check de mostrar subtotales

This commit is contained in:
dehernandezm 2025-02-14 11:48:36 -06:00
parent 33314359bf
commit e0c4ce0d19
5 changed files with 7 additions and 10 deletions

View File

@ -733,6 +733,7 @@ var PivotTableUI = function (_React$PureComponent2) {
return !_this8.props.hiddenAttributes.includes(e) && !_this8.props.hiddenFromDragDrop.includes(e);
});
var rowAttrsCell = this.makeDnDCell(rowAttrs, this.propUpdater('rows'), 'pvtAxisContainer pvtVertList pvtRows');
console.log('render rowAttrs ', rowAttrs);
var outputCell = _react2.default.createElement(
'td',
{ className: 'pvtOutput' },

File diff suppressed because one or more lines are too long

View File

@ -88,13 +88,10 @@ function makeRenderer() {
var pivotData = new _Utilities.PivotData(this.props);
var colAttrs = pivotData.props.cols;
var rowAttrs = pivotData.props.rows;
console.log('pivotData', pivotData);
console.log('colAttrs', colAttrs);
console.log('rowAttrs', rowAttrs);
var rowKeys = pivotData.getRowKeys();
var colKeys = pivotData.getColKeys();
var rowKeysSub = [];
if (rowAttrs !== null && rowAttrs.length > 1) {
if (this.props.showSubtotales === true && rowAttrs !== null && rowAttrs.length > 1) {
var beforeFirstKey = null;
for (var idx = 0; idx < rowKeys.length; idx++) {
var arrRowKeys = rowKeys[idx];
@ -114,7 +111,6 @@ function makeRenderer() {
} else {
rowKeysSub = pivotData.getRowKeys();
}
console.log('rowKeysSub', rowKeysSub);
var grandTotalAggregator = pivotData.getAggregator([], []);
var getStylesHeaders = function getStylesHeaders() {
@ -462,7 +458,7 @@ function makeRenderer() {
return _react2.default.createElement(
'td',
{
className: 'pvtVal ' + (isSubTotal ? 'pvtSubTotal' : ''),
className: 'pvtVal ' + (isSubTotal ? '' : getValueClass(aggregator)) + ' ' + (isSubTotal ? 'pvtSubTotal' : ''),
key: 'pvtVal' + i + '-' + j,
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
style: valueCellColors(rowKey, colKey, aggregator.value())
@ -477,7 +473,7 @@ function makeRenderer() {
onClick: getClickHandler && getClickHandler(totalAggregator.value(), rowKey, [null]),
style: colTotalColors(totalAggregator.value())
},
isSubTotal ? '' : getFormatedValue(totalAggregator)
getFormatedValue(totalAggregator)
)
);
}),

File diff suppressed because one or more lines are too long

View File

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