diff --git a/packages/nc-gui/utils/dataUtils.ts b/packages/nc-gui/utils/dataUtils.ts index ec7d2278f3..d1705492ce 100644 --- a/packages/nc-gui/utils/dataUtils.ts +++ b/packages/nc-gui/utils/dataUtils.ts @@ -355,7 +355,7 @@ export const getUserValue = (modelValue: string | string[] | null | Array, } export const getDecimalValue = (modelValue: string | null | number, col: ColumnType) => { - if (!modelValue || isNaN(Number(modelValue))) { + if ((!ncIsNumber(modelValue) && !modelValue) || isNaN(Number(modelValue))) { return '' } const columnMeta = parseProp(col.meta) @@ -364,7 +364,7 @@ export const getDecimalValue = (modelValue: string | null | number, col: ColumnT } export const getIntValue = (modelValue: string | null | number) => { - if (!modelValue || isNaN(Number(modelValue))) { + if ((!ncIsNumber(modelValue) && !modelValue) || isNaN(Number(modelValue))) { return '' } return Number(modelValue) as unknown as string