You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When writing some types of field level validators for fields inside an ArrayInput it would be useful to be able to get the index of the current component in some way. But I can also imagine other use cases for it.
Describe the solution you'd like
FormDataConsumer exposes formData & scopedFormData. I would like it to also expose index
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
This is not properly documented but there is a useSimpleFormIteratorItem hook that returns the index as you can see in the <SimpleFormIterator> documentation.
However, this implies to create a component which FormDataConsumer was actually meant to avoid. Can you open a PR for this targeting the next branch?
Is your feature request related to a problem? Please describe.
When writing some types of field level validators for fields inside an ArrayInput it would be useful to be able to get the index of the current component in some way. But I can also imagine other use cases for it.
Describe the solution you'd like
FormDataConsumer exposes
formData
&scopedFormData
. I would like it to also exposeindex
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: