Skip to content

Commit

Permalink
fix: Input type='number' support point
Browse files Browse the repository at this point in the history
  • Loading branch information
1uokun committed Jul 16, 2024
1 parent 4af9be0 commit e0c32b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const InternalInput: React.ForwardRefRenderFunction<TextInput, InputProps> = (
const formatText = useCallback(
(text: string) => {
if (type === 'number') {
text = text.replace(/[^\d]+/, '')
text = text.replace(/[^0-9.]/g, '')
}
return text
},
Expand Down

0 comments on commit e0c32b9

Please sign in to comment.