final-form / final-form/react-final-form
Providing a onChange prop for <Field> should not overwrite the internal final-form onChange function
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
bug report
### What is the current behavior?
When passing my own `onChange` prop it actually overwrites the `final-form` `onChange` function.
### What is the expected behavior?
When passing my own `onChange` function to the `` component **it should merge** with the internal `onChange` function of `final-form`
### Sandbox Link
https://codesandbox.io/s/w7pl6pqkrw
Try to select a value in the second dropdown. It'll fire the custom `myOnChange` function but won't select the value because it overwrites the `final-form` `onChange` function.
### What's your environment?
```
"final-form": "^3.0.0",
"react-final-form": "^2.1.1",
"react": "16.2.0",
"react-dom": "16.2.0",
```
```
node version: v8.9.1
```
Contributor guide
Assessment
This issue has not been assessed yet.