Skip to content

Commit 6bb70a1

Browse files
committed
fix: number input doesn't send NaN values
1 parent 6f804f2 commit 6bb70a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/number-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function NumberInput(props: NumberInputProps) {
5050
>
5151
<_NumberField.Input
5252
placeholder={local.placeholder}
53-
onChange={e => local.onChange?.(e.currentTarget.valueAsNumber)}
53+
onChange={e => local.onChange?.(Number(e.currentTarget.value))}
5454
class={
5555
'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-left text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50'
5656
}

0 commit comments

Comments
 (0)