test cambio de asignacion state

This commit is contained in:
dehernandezm 2025-02-17 07:27:18 -06:00
parent 2e486233b5
commit e66bc1d059
3 changed files with 7 additions and 6 deletions

View File

@ -364,7 +364,7 @@ var PivotTableUI = function (_React$PureComponent2) {
attrValues: {}, attrValues: {},
materializedInput: [], materializedInput: [],
hideConfiguration: false, hideConfiguration: false,
showSubtotales: props.showSubtotales, showSubtotales: false,
headerClass: '', headerClass: '',
stylesHeaders: {} stylesHeaders: {}
}; };
@ -462,7 +462,8 @@ var PivotTableUI = function (_React$PureComponent2) {
var newState = { var newState = {
data: nextData, data: nextData,
attrValues: {}, attrValues: {},
materializedInput: [] materializedInput: [],
showSubtotales: this.props.showSubtotales
}; };
var recordsProcessed = 0; var recordsProcessed = 0;
_Utilities.PivotData.forEachRecord(newState.data, this.props.derivedAttributes, function (record) { _Utilities.PivotData.forEachRecord(newState.data, this.props.derivedAttributes, function (record) {
@ -741,7 +742,7 @@ var PivotTableUI = function (_React$PureComponent2) {
return !_this8.props.hiddenAttributes.includes(e) && !_this8.props.hiddenFromDragDrop.includes(e); return !_this8.props.hiddenAttributes.includes(e) && !_this8.props.hiddenFromDragDrop.includes(e);
}); });
var toggleSubTotales = function toggleSubTotales() { var toggleSubTotales = function toggleSubTotales() {
var _showSubt = Boolean(_this8.props.showSubtotales); var _showSubt = _this8.props.showSubtotales === true ? true : false;
_this8.propUpdater('showSubtotales')(!_showSubt); _this8.propUpdater('showSubtotales')(!_showSubt);
_this8.setState({ showSubtotales: !_showSubt }); _this8.setState({ showSubtotales: !_showSubt });
}; };
@ -759,7 +760,7 @@ var PivotTableUI = function (_React$PureComponent2) {
), ),
_react2.default.createElement('input', { _react2.default.createElement('input', {
type: 'checkbox', type: 'checkbox',
checked: _this8.state.showSubtotales, checked: _this8.state.showSubtotales === true,
className: 'via-checkbox h-5 w-5 cursor-pointer', className: 'via-checkbox h-5 w-5 cursor-pointer',
onChange: function onChange() { onChange: function onChange() {
toggleSubTotales(); toggleSubTotales();

File diff suppressed because one or more lines are too long

View File

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