Skip to content

Commit f775788

Browse files
committed
only show number in TextInput if there is one
1 parent 822b10b commit f775788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/use/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function textInputValue(type:string, value:any) {
3535
} else if (type === 'time') {
3636
return timeInputFormat(value)
3737
} else if (type === 'number' || type === 'range') {
38-
return Number(value)
38+
return value == null ? '' : Number(value)
3939
}
4040
return value
4141
}

0 commit comments

Comments
 (0)