- fixed bug in JS;

This commit is contained in:
Vitalii Kiiko
2025-08-29 09:16:32 +02:00
parent 252bd97c55
commit b2020d2072
2 changed files with 4 additions and 4 deletions

View File

@@ -3,13 +3,15 @@ import getNumberFormatted from '../../../../../../../helpers/getNumberFormatted'
const LastRowCell = ({columnId, lastRowCfg, columnMeta = {}, tableValue = []}) => {
const cellData = head(lastRowCfg.filter(o => !isNil(o[columnId])));
console.log('LastRowCell Rendered', {columnId, lastRowCfg, columnMeta, tableValue});
console.log('cellData', cellData)
let cellValue = cellData[columnId];
if (columnMeta.enableFormula) {
cellValue = pathOr(0, ['total'], tableValue);
}
return <td>{is(Number, cellValue) ? getNumberFormatted(cellValue) : cellValue}</td>;
return <td>{cellValue && is(Number, cellValue) ? getNumberFormatted(cellValue) : cellValue}</td>;
};
export default LastRowCell;