-
-
Notifications
You must be signed in to change notification settings - Fork 71
Add ability to get field values #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 would love this as well |
Ha! This is already there (it's used in tests), but is totally undocumented and untyped. I'll remedy that shortly. |
Published fix in |
@erikras Is it possible when using |
@nvaken I think it is impossible. We have to subscription value to call fields.value. It's weird |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you submitting a bug report or a feature request?
Feature Request
What is the current behavior?
FieldArray
components get afields
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 aField
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'sid
and a_delete
key set totrue
.The reason the backend operates that way is to basically support
PATCH
-like requests where an entire array doesn't need to bePUT
, just the array members that have changed.Other information
Similar issue: #13
The text was updated successfully, but these errors were encountered: