validar si aggregator.format es una funcion
This commit is contained in:
parent
dccd627f1b
commit
84c65f2b8d
@ -290,7 +290,7 @@ function makeRenderer() {
|
||||
|
||||
var getFormatedValue = function getFormatedValue(aggregator) {
|
||||
var valToFormat = aggregator.value();
|
||||
var resultValue = aggregator.format(valToFormat);
|
||||
var resultValue = typeof aggregator.format === 'function' ? aggregator.format(valToFormat) : valToFormat;
|
||||
var keyColumnaCalculo = isNotNullish(_this2.props.vals) && _this2.props.vals.length ? _this2.props.vals[0] : null;
|
||||
if (_this2.props.aggregatorName === 'Conteo') {
|
||||
resultValue = isNotNullish(_this2.props.functions) ? _this2.props.functions.formatedValue(valToFormat, '0,0', 'number', false) : resultValue;
|
||||
@ -460,9 +460,7 @@ function makeRenderer() {
|
||||
);
|
||||
}),
|
||||
colKeys.map(function (colKey, j) {
|
||||
var aggregator = isSubTotal ? { value: function value() {
|
||||
return 0;
|
||||
} } : pivotData.getAggregator(rowKey, colKey); // getSubAggregator(rowKey, colKey);
|
||||
var aggregator = getSubAggregator(rowKey, colKey);
|
||||
return _react2.default.createElement(
|
||||
'td',
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "v-react-pivottable",
|
||||
"version": "0.11.55",
|
||||
"version": "0.11.56",
|
||||
"description": "A React-based pivot table",
|
||||
"main": "PivotTableUI.js",
|
||||
"files": [
|
||||
|
Loading…
Reference in New Issue
Block a user