Skip to content

Shift does not preserve field's state. #18

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. 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

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