final-form / final-form/react-final-form-arrays
`fields.remove` call with array of file inputs always removes last input in array, regardless of index argument
- Dominant language
- TypeScript
- Stars
- 210
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
A bug report
### What is the current behavior?
Input arrays don't work with file inputs (``) as expected. When clicking any of the remove buttons in the supplied sandbox, the last entry in the list of inputs is removed, not the one selected. (the `fields.remove` function always removes the last input, regardless of the index argument). When substituting text input fields instead of file uploads, it works as expected. (see second sandbox link)
### What is the expected behavior?
The `fields.remove` function should remove the input at the index it was passed, not the last one.
### Sandbox Link
File inputs: https://codesandbox.io/s/silly-stonebraker-vyi6l
Text inputs: https://codesandbox.io/s/jovial-kalam-8esq7
### What's your environment?
```
"final-form": "4.16.1"
"final-form-arrays": "1.1.2"
"react": "16.8.6"
"react-dom": "16.8.6"
"react-final-form": "6.3.0"
"react-final-form-arrays": "3.1.0"
```
### Other information
None.
Contributor guide
Assessment
This issue has not been assessed yet.