Skip to content

Commit

Permalink
fix(grid): the default value of a numeric field should not display 0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
minlovehua authored Dec 18, 2024
1 parent 5c33e88 commit 0574af9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/grid/src/core/utils/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function getDefaultFieldValue(field: AITableField) {
return [];
}
if (isNumberFiled(field)) {
return 0;
return null;
}
return '';
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function getDefaultValue() {
'column-20': ['66b31d0c8097a908f74bcd8a'],
'column-21': ['66b31d0c8097a908f74bcd8a'],
'column-22': ['66b31d0c8097a908f74bcd8a'],
'column-3': 1,
'column-3': 0,
'column-4': { timestamp: 1734636127 },
'column-5': ['member_01'],
'column-6': 10,
Expand Down Expand Up @@ -443,7 +443,7 @@ export function getCanvasDefaultValue() {
'column-111': ['piece_1'],
'column-112': ['tag_1'],
'column-20': ['66b31d0c8097a908f74bcd8a'],
'column-3': 1,
'column-3': 0,
'column-4': { timestamp: 1734636127 },
'column-5': ['member_01'],
'column-6': 10,
Expand Down

0 comments on commit 0574af9

Please sign in to comment.