I'm not familiar with an efficient and user-friendly method to selectively render a specific index using the <FieldArray> component. Please refer to the provided code snippet for more details:
In this example, my requirement is to render a particular index (currentIndex) or form from the rows specification. However, I have to either manually map the entire rows or access the formik.values[currentIndex] in a non-ideal way.
Introducing an option within the render method to provide access and enable manipulation of a specific index or form would be highly beneficial.
Note: It does not seem possible to directly access the rows object like:
I'm not familiar with an efficient and user-friendly method to selectively render a specific index using the
<FieldArray>
component. Please refer to the provided code snippet for more details:In this example, my requirement is to render a particular index (
currentIndex
) or form from the rows specification. However, I have to either manually map the entire rows or access theformik.values[currentIndex]
in a non-ideal way.Introducing an option within the render method to provide access and enable manipulation of a specific index or form would be highly beneficial.
Note: It does not seem possible to directly access the
rows
object like:EDIT 1: So that is the closest solution I found to this, any suggestions would be appreciated: