Closed
Description
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 the component
prop receives a prop called value
. 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 in react-final-form
.
Any guidance?
Metadata
Metadata
Assignees
Labels
No labels
Activity
erikras commentedon Jan 4, 2018
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...
GavinThompson commentedon Jan 4, 2018
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! 😄
shrynx commentedon Jan 24, 2018
@erikras It seems this been removed from the latest version, any plans for alternate api ?
davidroeca commentedon Feb 7, 2019
It would be really nice to have the
get
functionality. As a work-around, I had success with theField
component; it works with both the entire FieldArray name as well as the field name from a call tofields.map()
:erikras commentedon Aug 15, 2019
Published fix in
v3.1.1
.