Skip to content

Commit

Permalink
feat: cast number field types to Number
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Sep 22, 2023
1 parent f7125de commit d5df959
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/components/InputOrGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,13 @@ export const InputOrGroup = ({
type={field.type}
name={name}
value={value}
onChange={(e) => onChange(e.currentTarget.value)}
onChange={(e) => {
if (field.type === "number") {
onChange(Number(e.currentTarget.value));
} else {
onChange(e.currentTarget.value);
}
}}
readOnly={readOnly}
/>
</label>
Expand Down

0 comments on commit d5df959

Please sign in to comment.