Skip to content

Commit

Permalink
fix(HiddenInput): delay onChange to set hiddenValue
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshpastakia committed Dec 19, 2024
1 parent 10ac8c4 commit 19191ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/form/src/input/Hidden.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const HiddenInput = ({
name,
}: Props) => {
useEffect(() => {
onChange?.(hiddenValue);
setTimeout(() => {
onChange?.(hiddenValue);
}, 50);
}, [hiddenValue]);
return (
<Fragment>
Expand Down

0 comments on commit 19191ec

Please sign in to comment.