From 2e9c79df27b7bd71335798e587d7df2e8c104192 Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Fri, 15 Jul 2022 19:37:20 +1000 Subject: [PATCH] fix: now checking 'name' in values in InputNumber for allocating value for Formik --- src/components/InputNumber/InputNumber.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/InputNumber/InputNumber.tsx b/src/components/InputNumber/InputNumber.tsx index 1a552b84..54694ad5 100644 --- a/src/components/InputNumber/InputNumber.tsx +++ b/src/components/InputNumber/InputNumber.tsx @@ -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) { if (handleBlur) handleBlur(e)