final-form / final-form/react-final-form-arrays

FieldArray's unshift mutator does not update state correctly

Open
#36 6 comments 2 reactions 0 assignees View on GitHub
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**?
Bug

### What is the current behavior?
When using the `unshift` mutator to add an item to the beginning of an array, the touched state from the item previously at index zero (if one exists) is maintained.

### What is the expected behavior?
I would expect the item that was added to the beginning of the array to have a touched state of false.

### Sandbox Link
N/A, but I will happily provide one if needed.

### What's your environment?

- final-form: 4.8.3
- react-final-form: 3.6.4
- final-forms-array: 1.0.4
- react-final-forms-array: 1.0.6
- React: 16.4.1
- Chrome: 68.0.3440.75

### Other information
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.