Fix exporting - cell type default, if value was number, was being lost in call to htmlToText.

This commit is contained in:
2023-12-18 10:21:24 -06:00
parent f41e5d9c0c
commit 4a0e123f90

View File

@ -86,14 +86,18 @@ function TableWidget(props: Props): JSX.Element
}
const cell = rows[i][columns[j].accessor];
const text = htmlToText(cell,
{
selectors: [
{selector: "a", format: "inline"},
{selector: ".MuiIcon-root", format: "skip"},
{selector: ".button", format: "skip"}
]
});
let text = cell;
if(columns[j].type != "default")
{
text = htmlToText(cell,
{
selectors: [
{selector: "a", format: "inline"},
{selector: ".MuiIcon-root", format: "skip"},
{selector: ".button", format: "skip"}
]
});
}
csv += `"${ValueUtils.cleanForCsv(text)}"`;
}
csv += "\n";