Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert modifies other inputs state #24

Closed
maciejmyslinski opened this issue Jan 28, 2019 · 1 comment
Closed

Insert modifies other inputs state #24

maciejmyslinski opened this issue Jan 28, 2019 · 1 comment

Comments

@maciejmyslinski
Copy link

Are you submitting a bug report or a feature request?

bug report

What is the current behavior?

We have an array of fruits.
Initial values are: ['']

Steps to reproduce:
  1. Click insert(0, 'apple') button.

The input of index 1 (the last one) have pristine: true state even though it was never touched.

What is the expected behavior?

The input of index 1 (the last one) should have pristine: false since it was never touched.

Sandbox Link

Edit 🐛 Insert modifies other input's state

What's your environment?

package version
final-form 4.11
react-final-form 4.0.2
final-form-arrays 1.1.1
react-final-form-arrays 2.0.1

Other information

@erikras
Copy link
Member

erikras commented Jul 15, 2019

This is not a bug for the same reason as #23 (comment).

If you initialize the value to { fruits: [ undefined ] }, it works as expected.

@erikras erikras closed this as completed Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants