Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

FieldArray getAll method returns undefined #1196

Closed
depiction opened this issue Dec 21, 2018 · 0 comments
Closed

FieldArray getAll method returns undefined #1196

depiction opened this issue Dec 21, 2018 · 0 comments

Comments

@depiction
Copy link

depiction commented Dec 21, 2018

The Problem

I have a multipage form that I created using the Wizard Form as an example. One of the two pages/forms has both field editing and view states. The editing state is complete. I'm trying to build the view state, which will be an unordered list with each item in the list representing an item in the FieldArray.

The getAll method doesn't return items in the FieldArray. Calling get() with an index returns an item from the FieldArray, so I know that there are items in the FieldArray.

Steps to Reproduce

I'm using React 16.2.0, Redux 3.7.2, and ReduxForm 7.2.0.

condition = this.props.fields.get(0)
console.log(condition) // displays: {attribute: "status", conditionValues: Array(1), qualifier: "equalToString"}
allConditions = this.props.fields.getAll()
console.log(allConditions) // displays: [undefined]

Expected Behavior

getAll() should return an array of objects

Actual Behavior

returns [undefined]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant