marmelab / marmelab/react-admin
Add index to FormDataConsumer when used inside an ArrayInput
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 26.9k
- Forks
- 5.5k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 19
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating FormDataConsumer and ArrayInput, then inspect how formData and scopedFormData are exposed to components inside array items. Done means FormDataConsumer exposes the current array item's index when used inside an ArrayInput, with the existing behavior preserved for other uses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100