fix(BalanceSheet): columns width based in cells contents.

This commit is contained in:
a.bouhuolia
2022-01-29 21:32:20 +02:00
parent 77d826e6d4
commit 066df28257
4 changed files with 69 additions and 35 deletions

View File

@@ -439,9 +439,11 @@ export const getColumnWidth = (
rows,
accessor,
{ maxWidth, minWidth, magicSpacing = 14 },
headerText = ''
) => {
const cellLength = Math.max(
...rows.map((row) => (`${_.get(row, accessor)}` || '').length),
headerText.length
);
let result = cellLength * magicSpacing;