test agregar prop hide / show dentro de state

This commit is contained in:
dehernandezm 2024-12-17 15:11:49 -06:00
parent 7565e18417
commit 367f98ed4d
3 changed files with 6 additions and 14 deletions

View File

@ -330,8 +330,6 @@ var PivotTableUI = function (_React$PureComponent2) {
function PivotTableUI(props) {
_classCallCheck(this, PivotTableUI);
console.log(' run constructor');
var _this5 = _possibleConstructorReturn(this, (PivotTableUI.__proto__ || Object.getPrototypeOf(PivotTableUI)).call(this, props));
_this5.state = {
@ -341,7 +339,7 @@ var PivotTableUI = function (_React$PureComponent2) {
openDropdown: false,
attrValues: {},
materializedInput: [],
hideConfiguration: props.hideConfiguration
hideConfiguration: false
};
return _this5;
}
@ -349,13 +347,11 @@ var PivotTableUI = function (_React$PureComponent2) {
_createClass(PivotTableUI, [{
key: 'componentDidMount',
value: function componentDidMount() {
console.log(' run componentDidMount');
this.materializeInput(this.props.data);
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
console.log(' run componentDidUpdate');
this.materializeInput(this.props.data);
}
}, {
@ -513,10 +509,8 @@ var PivotTableUI = function (_React$PureComponent2) {
value: function render() {
var _this8 = this;
console.log(' run render');
var getRenderResult = function getRenderResult() {
return _this8.props.hideConfiguration === true;
return _this8.state.hideConfiguration === true;
};
var numValsAllowed = this.props.aggregators[this.props.aggregatorName]([])().numInputs || 0;
@ -774,8 +768,7 @@ PivotTableUI.propTypes = Object.assign({}, _PivotTable2.default.propTypes, {
hiddenFromAggregators: _propTypes2.default.arrayOf(_propTypes2.default.string),
hiddenFromDragDrop: _propTypes2.default.arrayOf(_propTypes2.default.string),
unusedOrientationCutoff: _propTypes2.default.number,
menuLimit: _propTypes2.default.number,
hideConfiguration: _propTypes2.default.bool
menuLimit: _propTypes2.default.number
});
PivotTableUI.defaultProps = Object.assign({}, _PivotTable2.default.defaultProps, {
@ -783,8 +776,7 @@ PivotTableUI.defaultProps = Object.assign({}, _PivotTable2.default.defaultProps,
hiddenFromAggregators: [],
hiddenFromDragDrop: [],
unusedOrientationCutoff: 85,
menuLimit: 500,
hideConfiguration: false
menuLimit: 500
});
exports.default = PivotTableUI;

File diff suppressed because one or more lines are too long

View File

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