Skip to content

Commit

Permalink
Update NumberInput.tsx to typecast to number during onChange event (#…
Browse files Browse the repository at this point in the history
…15739)

Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
dkaushik95 and tay1orjones authored Feb 14, 2024
1 parent 667c2eb commit db6f87a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(
}

const state = {
value: event.target.value,
value: Number(event.target.value),
direction: value < event.target.value ? 'up' : 'down',
};
setValue(state.value);
Expand Down

0 comments on commit db6f87a

Please sign in to comment.