-
-
Notifications
You must be signed in to change notification settings - Fork 71
FieldArray gives my rendered component a prop called value
, is this a public API?
#13
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
Wow. Brilliant observation! I totally overlooked that. Let me think about it, but without thinking too much about it, I'm leaning towards the redux-form API... |
Excellent, thanks for the quick response! Will hold off on any more changes on our end and circle back in the near future. Thanks again! 😄 |
@erikras It seems this been removed from the latest version, any plans for alternate api ? |
It would be really nice to have the <FieldArray name='myArray'>
{({ fields }) => (
<React.Fragment>
{fields.map((name) => (
<Field name={name} subscription={{value: true}}>
{({ input: { value: field }}) => (
<div>{JSON.stringify(field, null, 2)}</div>
)}
</Field>
)}
<Field name='myArray' subscription={{value: true}}>
{({ input: { value: fieldValues }}) => (
<div>{JSON.stringify(fieldValues, null, 2)}</div>
)}
</Field>
</React.Fragment>
)}
</FieldArray> |
Published fix in |
Are you submitting a bug report or a feature request?
Bug report, maybe? Docs?
What is the current behavior?
The component I pass to
<FieldArray>
in thecomponent
prop receives a prop calledvalue
. Is this a public/stable API?I don't see this in
FieldArrayRenderProps
, either in the docs or the flow types.What is the expected behavior?
Sandbox Link
Here's the FieldArray example, adapted to show I can read from the
value
prop.https://codesandbox.io/s/n1nn8rpjwl
What's your environment?
Same as the example codesandbox.
Other information
Ultimately what I'm looking for is a way to read from the FieldArray programmatically/imperatively.
In redux-form I could use
.get()
and/or.getAll()
, but this isn't available inreact-final-form
.Any guidance?
The text was updated successfully, but these errors were encountered: