form
form copied to clipboard
Form Meta type is unknown when passing formOptions alongside onSubmitMeta
Describe the bug
When passing formOptions to useAppForm or useForm alongside onSubmitMeta the meta object in onSubmit is typed as unknown as well as the args that can be passed to the form.handleSubmit function.
Your minimal, reproducible example
https://codesandbox.io/p/devbox/quizzical-night-v3hl2x?file=%2Fsrc%2Ffeatures%2Fpeople%2Fpage.tsx%3A17%2C11
Steps to reproduce
- Open
src/features/people/page.tsxcomponent - Notice type error in line 37 and argument type for
handleSubmitin line 47 beingunknown
Expected behavior
Expected the types for handleSubmit args and meta to be properly inferred like they are when you don't pass formOptions to the useAppForm or useForm hooks.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
OS: Windows 11 Browser: Chrome Version: 130.0.6723.71 (Official Build) (64-bit)
TanStack Form adapter
react-form
TanStack Form version
1.0.0
TypeScript version
5.7.2
Additional context
No response