From 19191ec260b55d9a5af45142c698ce76741460e1 Mon Sep 17 00:00:00 2001 From: Adarsh Pastakia Date: Thu, 19 Dec 2024 09:14:09 +0400 Subject: [PATCH] fix(HiddenInput): delay onChange to set hiddenValue --- packages/form/src/input/Hidden.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/form/src/input/Hidden.tsx b/packages/form/src/input/Hidden.tsx index 5b75338..81b987a 100644 --- a/packages/form/src/input/Hidden.tsx +++ b/packages/form/src/input/Hidden.tsx @@ -54,7 +54,9 @@ export const HiddenInput = ({ name, }: Props) => { useEffect(() => { - onChange?.(hiddenValue); + setTimeout(() => { + onChange?.(hiddenValue); + }, 50); }, [hiddenValue]); return (