From 26daac43d34728a6e5d7659bb7cb183a2aa3d3a6 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Thu, 26 Sep 2024 12:33:47 +0200 Subject: [PATCH] :bug: [open-formulieren/open-forms#4659] Ensure that textfield have a valid empty value --- src/components/formio/textfield.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/formio/textfield.tsx b/src/components/formio/textfield.tsx index 082a2103..287d1bae 100644 --- a/src/components/formio/textfield.tsx +++ b/src/components/formio/textfield.tsx @@ -35,7 +35,7 @@ export const TextField: React.FC { - const {getFieldProps, getFieldMeta} = useFormikContext(); + const {getFieldProps, getFieldMeta, setFieldValue} = useFormikContext(); const {value, onChange: formikOnChange} = getFieldProps(name); const {touched} = getFieldMeta(name); const {errors, hasErrors} = useValidationErrors(name); @@ -48,6 +48,11 @@ export const TextField: React.FC