agregar ejecución de funcion classitem que se agrega por reglas de mapeo
This commit is contained in:
parent
bf7cd5bd21
commit
cf90f116a4
@ -282,6 +282,20 @@ function makeRenderer() {
|
||||
return resultValue;
|
||||
};
|
||||
|
||||
var getValueClass = function getValueClass(aggregator) {
|
||||
var valToFormat = aggregator.value();
|
||||
var keyColumnaCalculo = isNotNullish(_this2.props.vals) && _this2.props.vals.length ? _this2.props.vals[0] : null;
|
||||
if (isNotNullish(keyColumnaCalculo) && isNotNullish(_this2.props.headersDefinitions)) {
|
||||
var _definition = _this2.props.headersDefinitions[keyColumnaCalculo];
|
||||
var objItem = {};
|
||||
if (isNotNullish(_definition) && isNotNullish(_definition.value) && isNotNullish(_definition.classItem) && typeof _definition.classItem === 'function') {
|
||||
objItem[_definition.value] = valToFormat;
|
||||
return _definition.classItem(objItem, true);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
return _react2.default.createElement(
|
||||
'table',
|
||||
{ className: 'pvtTable' },
|
||||
@ -373,7 +387,7 @@ function makeRenderer() {
|
||||
return _react2.default.createElement(
|
||||
'td',
|
||||
{
|
||||
className: 'pvtVal',
|
||||
className: 'pvtVal ' + getValueClass(aggregator),
|
||||
key: 'pvtVal' + i + '-' + j,
|
||||
onClick: getClickHandler && getClickHandler(aggregator.value(), rowKey, colKey),
|
||||
style: valueCellColors(rowKey, colKey, aggregator.value())
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "v-react-pivottable",
|
||||
"version": "0.11.29",
|
||||
"version": "0.11.30",
|
||||
"description": "A React-based pivot table",
|
||||
"main": "PivotTableUI.js",
|
||||
"files": [
|
||||
|
Loading…
Reference in New Issue
Block a user