Skip to content

feat: expose index in FormDataConsumer - #11343

Open
Aayush5154 wants to merge 1 commit into
marmelab:nextfrom
Aayush5154:fix/form-data-consumer-index
Open

feat: expose index in FormDataConsumer#11343
Aayush5154 wants to merge 1 commit into
marmelab:nextfrom
Aayush5154:fix/form-data-consumer-index

Conversation

@Aayush5154

Copy link
Copy Markdown

Fixes #10498

Problem

FormDataConsumer exposes formData and scopedFormData, but does not expose the index of the current item when used inside an ArrayInput.

Solution

Expose the current ArrayInput item index through FormDataConsumerRenderParams.

The index is extracted from the array source and passed to the render function.

How To Test

  • Added a regression test for FormDataConsumer inside an ArrayInput.
  • Verified that the index is correctly exposed for multiple array items.
  • All test suites pass.

Additional Checks

  • The PR targets next for a feature
  • The PR includes unit tests
  • The PR includes no unnecessary changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant