fix(nc-gui): parse numeric field plain cell value issue if value is 0

This commit is contained in:
Ramesh Mane
2025-05-19 11:49:02 +00:00
parent 21f14b4a69
commit 44b486830e

View File

@@ -355,7 +355,7 @@ export const getUserValue = (modelValue: string | string[] | null | Array<any>,
}
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