Description
Are you submitting a bug report or a feature request?
Feature Request
What is the current behavior?
FieldArray
components get a fields
prop which is an object containing various methods.
What is the expected behavior?
It'd be great if it were possible to get the values of those, similar to redux-form's fields.getAll()
functionality.
I realise that many problems can be solved by rendering the FieldArray
's members as a Field
and managing the value there. However, this pattern can be pretty ugly in some situations.
For example, here's an HOC that uses getAll()
in production. The point of that HOC is mainly to abstract away the complexity in how our backends handle array member deletion from form fields. The complexity is that when we want to delete an array member object, we need to send back an array that contains an object with the member's id
and a _delete
key set to true
.
The reason the backend operates that way is to basically support PATCH
-like requests where an entire array doesn't need to be PUT
, just the array members that have changed.
Other information
Similar issue: #13