Skip to content

Wrong fields state after pop and unshift #21

Closed
@maciejmyslinski

Description

@maciejmyslinski

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. Modify field for Fruit Fix package naming #1 (eg. type 'orange')

  2. Click on `pop()` button

  3. Click on `unshift('apple')` button.

Fruit #1 is touched even though it was never focused
Fruit #2 is not touched even though it was focused and blurred.

What is the expected behavior?

I would expect Fruit #1 to have touched: false since it was never focused.
I would expect Fruit #2 to have touched: true since it was focused and blurred.

Sandbox Link

Edit 🐛 Wrong fields state after pop and unshift

What's your environment?

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

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions