test agregar prop hide / show dentro de state
This commit is contained in:
parent
7565e18417
commit
367f98ed4d
@ -330,8 +330,6 @@ var PivotTableUI = function (_React$PureComponent2) {
|
|||||||
function PivotTableUI(props) {
|
function PivotTableUI(props) {
|
||||||
_classCallCheck(this, PivotTableUI);
|
_classCallCheck(this, PivotTableUI);
|
||||||
|
|
||||||
console.log(' run constructor');
|
|
||||||
|
|
||||||
var _this5 = _possibleConstructorReturn(this, (PivotTableUI.__proto__ || Object.getPrototypeOf(PivotTableUI)).call(this, props));
|
var _this5 = _possibleConstructorReturn(this, (PivotTableUI.__proto__ || Object.getPrototypeOf(PivotTableUI)).call(this, props));
|
||||||
|
|
||||||
_this5.state = {
|
_this5.state = {
|
||||||
@ -341,7 +339,7 @@ var PivotTableUI = function (_React$PureComponent2) {
|
|||||||
openDropdown: false,
|
openDropdown: false,
|
||||||
attrValues: {},
|
attrValues: {},
|
||||||
materializedInput: [],
|
materializedInput: [],
|
||||||
hideConfiguration: props.hideConfiguration
|
hideConfiguration: false
|
||||||
};
|
};
|
||||||
return _this5;
|
return _this5;
|
||||||
}
|
}
|
||||||
@ -349,13 +347,11 @@ var PivotTableUI = function (_React$PureComponent2) {
|
|||||||
_createClass(PivotTableUI, [{
|
_createClass(PivotTableUI, [{
|
||||||
key: 'componentDidMount',
|
key: 'componentDidMount',
|
||||||
value: function componentDidMount() {
|
value: function componentDidMount() {
|
||||||
console.log(' run componentDidMount');
|
|
||||||
this.materializeInput(this.props.data);
|
this.materializeInput(this.props.data);
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'componentDidUpdate',
|
key: 'componentDidUpdate',
|
||||||
value: function componentDidUpdate() {
|
value: function componentDidUpdate() {
|
||||||
console.log(' run componentDidUpdate');
|
|
||||||
this.materializeInput(this.props.data);
|
this.materializeInput(this.props.data);
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@ -513,10 +509,8 @@ var PivotTableUI = function (_React$PureComponent2) {
|
|||||||
value: function render() {
|
value: function render() {
|
||||||
var _this8 = this;
|
var _this8 = this;
|
||||||
|
|
||||||
console.log(' run render');
|
|
||||||
|
|
||||||
var getRenderResult = function getRenderResult() {
|
var getRenderResult = function getRenderResult() {
|
||||||
return _this8.props.hideConfiguration === true;
|
return _this8.state.hideConfiguration === true;
|
||||||
};
|
};
|
||||||
|
|
||||||
var numValsAllowed = this.props.aggregators[this.props.aggregatorName]([])().numInputs || 0;
|
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),
|
hiddenFromAggregators: _propTypes2.default.arrayOf(_propTypes2.default.string),
|
||||||
hiddenFromDragDrop: _propTypes2.default.arrayOf(_propTypes2.default.string),
|
hiddenFromDragDrop: _propTypes2.default.arrayOf(_propTypes2.default.string),
|
||||||
unusedOrientationCutoff: _propTypes2.default.number,
|
unusedOrientationCutoff: _propTypes2.default.number,
|
||||||
menuLimit: _propTypes2.default.number,
|
menuLimit: _propTypes2.default.number
|
||||||
hideConfiguration: _propTypes2.default.bool
|
|
||||||
});
|
});
|
||||||
|
|
||||||
PivotTableUI.defaultProps = Object.assign({}, _PivotTable2.default.defaultProps, {
|
PivotTableUI.defaultProps = Object.assign({}, _PivotTable2.default.defaultProps, {
|
||||||
@ -783,8 +776,7 @@ PivotTableUI.defaultProps = Object.assign({}, _PivotTable2.default.defaultProps,
|
|||||||
hiddenFromAggregators: [],
|
hiddenFromAggregators: [],
|
||||||
hiddenFromDragDrop: [],
|
hiddenFromDragDrop: [],
|
||||||
unusedOrientationCutoff: 85,
|
unusedOrientationCutoff: 85,
|
||||||
menuLimit: 500,
|
menuLimit: 500
|
||||||
hideConfiguration: false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.default = PivotTableUI;
|
exports.default = PivotTableUI;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "v-react-pivottable",
|
"name": "v-react-pivottable",
|
||||||
"version": "0.11.7",
|
"version": "0.11.8",
|
||||||
"description": "A React-based pivot table",
|
"description": "A React-based pivot table",
|
||||||
"main": "PivotTableUI.js",
|
"main": "PivotTableUI.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
Loading…
Reference in New Issue
Block a user