redux-form: FieldArray removing property names if value is empty on blur (added after initialization)

Are you submitting a bug report or a feature request?

Bug Report

What is the current behavior?

When an object is pushed to a field array, it can have properties with values defined in advance. (In the example below, note ‘bob’ as a pre-defined firstName when adding a member. However, when a property’s value is an empty string blurring the corresponding input field causes the the form values to drop the property name in question.

To reproduce:

  • open link below
  • open console
  • add a member
  • open fields array printed in console. has both firstName and lastName props in first object.
  • blur lastName without changing the value
  • open newly printed fields array in console, lastName property is missing. This appears to happen in @@redux-form/BLUR.

What is the expected behavior?

That the key/value persist in the object.

Sandbox Link

A reproduction of the issue.

What’s your environment?

react v15.4.1 redux v3.6.0 redux-form v6.3.2

Other information

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Fix released in v7.4.0.

@erikras - Any status update on this issue?

I upgraded to 7.4.0 but am still experiencing this exact behavior. Is there a flag that needs to be set somewhere or something?