final-form / final-form/react-final-form
How to set Form's values interface?
Open
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
From the typings, I can see that Form props are of type `FormProps from 'react-final-form'` and that extends `Config from 'final-form'`. Config accepts type generics that eventually set the type of `values` ->
```
Config {
onSubmit: (values: FormData) // ...
}
```
How can I configure the values type from within the Form itself so that I have intellisense within onSubmit and validation handlers and everywhere else where values appear?
PS: shouldn't the values here be also of `FormData`
```
validate?: (values: object)
initialValues: object
```
Contributor guide
Assessment
This issue has not been assessed yet.