Skip to content

Commit

Permalink
fix: now checking 'name' in values in InputNumber for allocating valu…
Browse files Browse the repository at this point in the history
…e for Formik
  • Loading branch information
MildTomato committed Jul 15, 2022
1 parent b0c7d90 commit 2e9c79d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/InputNumber/InputNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function InputNumber({
fieldLevelValidation,
} = useFormContext()

if (values && !value) value = values[id]
if (values && !value) value = values[id || name]

function handleBlurEvent(e: React.FocusEvent<HTMLInputElement>) {
if (handleBlur) handleBlur(e)
Expand Down

0 comments on commit 2e9c79d

Please sign in to comment.