final-form / final-form/react-final-form
Nested Fields can cause issues (FieldArray > Field > Field)
- 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**?
I think it could be a bug, but perhaps I am doing something that is not intended.
### What is the current behavior?
I have a scenario where I have a `FieldArray` with a `Field`, that has a `Field` as child. The idea is that we only show the `maxLength` field if the parent `isList` field is `true`. Sorry, for the sudo-code here, but this is an example of the nesting:
```
{({ fields }) => {
{fields.map((name, index) => (
{({input, meta}) => (
{input.isList ? (
### What is the expected behavior?
Fields would move, and the form would not explode.
### Sandbox Link
At the default state, click the massively oversized "Move" button.
https://codesandbox.io/s/32p402x3om
### What's your environment?
"final-form": "4.10.0",
"final-form-arrays": "1.1.0",
"react": "16.4.0",
"react-dom": "16.4.0",
"react-final-form": "3.6.5",
"react-final-form-arrays": "1.0.6",
"styled-components": "3.3.2"
### Other information
Contributor guide
Assessment
This issue has not been assessed yet.