Introduce <ArrayInputBase>, <SimpleFomIteratorBase> and <SimpleFormIteratorItemBase>#10955
Merged
Introduce <ArrayInputBase>, <SimpleFomIteratorBase> and <SimpleFormIteratorItemBase>#10955
<ArrayInputBase>, <SimpleFomIteratorBase> and <SimpleFormIteratorItemBase>#10955Conversation
…ormIteratorItemBase>`
fzaninotto
reviewed
Sep 25, 2025
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces three new base components (<ArrayInputBase>, <SimpleFormIteratorBase>, and <SimpleFormIteratorItemBase>) to facilitate code reuse when implementing custom UI libraries. These components extract the core logic from existing UI-specific components to ra-core, enabling developers to build new UI implementations without duplicating business logic.
- Introduces new base components in
ra-corefor ArrayInput and SimpleFormIterator functionality - Refactors existing Material-UI components to use the new base components
- Adds comprehensive test-ui components for testing the new functionality
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ra-core/src/controller/input/ArrayInputBase.tsx | New base component for array input functionality |
| packages/ra-core/src/controller/input/SimpleFormIteratorBase.tsx | New base component for form iterator logic |
| packages/ra-core/src/controller/input/SimpleFormIteratorItemBase.tsx | New base component for iterator item functionality |
| packages/ra-ui-materialui/src/input/ArrayInput/ArrayInput.tsx | Refactored to use ArrayInputBase |
| packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx | Refactored to use SimpleFormIteratorBase |
| packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIteratorItem.tsx | Refactored to use SimpleFormIteratorItemBase |
| packages/ra-core/src/test-ui/* | New test UI components for testing base components |
| docs_headless/src/content/docs/ArrayInputBase.md | Documentation for new ArrayInputBase component |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIteratorItem.tsx
Outdated
Show resolved
Hide resolved
slax57
requested changes
Oct 1, 2025
packages/ra-core/src/controller/input/useGetArrayInputNewItemDefaults.ts
Show resolved
Hide resolved
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx
Outdated
Show resolved
Hide resolved
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIteratorItem.tsx
Outdated
Show resolved
Hide resolved
slax57
reviewed
Oct 7, 2025
packages/ra-ui-materialui/src/input/ArrayInput/SimpleFormIterator.tsx
Outdated
Show resolved
Hide resolved
slax57
reviewed
Oct 7, 2025
slax57
approved these changes
Oct 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When implementing new UI (e.g. ShadnAdminKit), we have to repeat a lot of code that could be in
ra-core.Solution
Introduce
<ArrayInputBase>,<SimpleFomIteratorBase>and<SimpleFormIteratorItemBase>How To Test
Additional Checks
masterfor a bugfix or a documentation fix, ornextfor a featureAlso, please make sure to read the contributing guidelines.