Skip to content

Commit e453d99

Browse files
authored
Support string data in numerical spreadsheet columns (#3401)
Signed-off-by: David BRAQUART <[email protected]>
1 parent 784d229 commit e453d99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/custom-aggrid/cell-renderers.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export interface NumericCellRendererProps extends CustomCellRendererProps {
9090
}
9191

9292
export const NumericCellRenderer = (props: NumericCellRendererProps) => {
93-
const cellValue = formatNumericCell(props.value, props.fractionDigits);
93+
const numericalValue = typeof props.value === 'number' ? props.value : Number.parseFloat(props.value);
94+
const cellValue = formatNumericCell(numericalValue, props.fractionDigits);
9495
return (
9596
<Box sx={mergeSx(styles.tableCell)}>
9697
<Tooltip

0 commit comments

Comments
 (0)