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

Shift does not preserve field's state. #18

Closed
maciejmyslinski opened this issue Dec 10, 2018 · 2 comments
Closed

Shift does not preserve field's state. #18

maciejmyslinski opened this issue Dec 10, 2018 · 2 comments

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. Enter a value into Fruit #1 field (eg. 'apple')
  2. Blur the Fruit #1 field. It becomes touched.
  3. Click `shift()` button.

The field that was never touched now has `touched: true`

What is the expected behavior?

Fruit #1 field should have touched: false since the definition of touched is:

true if this field has ever gained and lost focus. false otherwise.

Sandbox Link

Edit 🐛 shift() doesn't preserve field'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

@ventrz
Copy link

ventrz commented Jan 18, 2019

Also such thing is reproducible for remove action:

Steps to reproduce:

  1. Focus Fruit #1 field
  2. Blur Fruit #1 field (it becomes touched)
  3. Remove Fruit #1 field

Fruit #2 field has touched: true state, but it has never been touched actually.

@erikras
Copy link
Member

erikras commented Jul 13, 2019

Fixed. Requires [email protected] and [email protected].

Edit 🐛 shift() doesn't preserve field's state

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

3 participants