Skip to content

Commit 572f05d

Browse files
authored
fix: bigint (#604)
1 parent 4220888 commit 572f05d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/views/dashboard/modules/data-view/components/data-grid.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,12 @@ a-card.data-grid(:bordered="false")
153153
154154
tempRow.__types[columnName] = type
155155
156-
// If item is a big number (as string), convert it to Number for table to show
156+
// Convert numeric strings to Number only for types that fit in JS safe integer;
157+
// Int64/UInt64 must stay as string to preserve precision (JSONbigint storeAsString).
157158
if (numberTypes.includes(type) && typeof item === 'string') {
158-
item = Number(item)
159+
if (type !== 'Int64' && type !== 'UInt64' && type !== 'Float64') {
160+
item = Number(item)
161+
}
159162
}
160163
tempRow[columnName] = item
161164
})

0 commit comments

Comments
 (0)