mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 17:17:06 +00:00
fix(nc-gui): parse numeric field plain cell value issue if value is 0
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user