final-form / final-form/react-final-form
Custom Input buttons for radio-like input
- 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**?
Maybe a bug, but probably ignorance of custom input usage.
Basically, I'm looking for the best way to do [this](https://codesandbox.io/s/ojx3wyyjp6) and it's not clear to me in the docs...
### What is the current behavior?
```jsx
true}>
{({input, meta}) => (
)}
yields `Warning: Can't call setState on a component that is not yet mounted.` on first and only first click
```
### What is the expected behavior?
no React lifecycle warning
### Sandbox Link
[Stack](https://stackoverflow.com/questions/52864734/how-can-i-create-custom-fields-in-react-final-form)
[Codesandbox](https://codesandbox.io/s/ojx3wyyjp6)
### What's your environment?
"react-final-form": "^3.6.7",
"final-form": "^4.10.0",
Chrome
### Other information
Best I can tell, this is happening in `registerField` call in final-form repo. The following line:
```js
change: function change(value) {
return api.change(name, value);
},
```
Contributor guide
Assessment
This issue has not been assessed yet.