Docs/add custom fields documentation#10738
Open
ghadabezine wants to merge 2 commits intomarmelab:masterfrom
Open
Docs/add custom fields documentation#10738ghadabezine wants to merge 2 commits intomarmelab:masterfrom
ghadabezine wants to merge 2 commits intomarmelab:masterfrom
Conversation
djhi
reviewed
May 13, 2025
Collaborator
djhi
left a comment
There was a problem hiding this comment.
Thanks for the PR. Why did you update SelectArrayInput?
Contributor
|
Also, I'm not sure this PR goes in the right direction. To me, fzaninotto's answer rather suggested we want to move away from defaultProps, as they are deprecated and will be removed. At the very best we can clarify why they are still needed in some cases, and make it clear they are deprecated so alternatives should be considered, but IMHO we should not say adding defaultProps is recommended. Also, I believe we should update the existing doc section rather than creating a new one (which is not referenced in the navigation menu btw). Lastly, I believe the |
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.
Description
This PR adds documentation explaining best practices for creating custom field components in react-admin, with a specific focus on using defaultProps for labels. This addresses issue #10684.
Changes
docs/CustomFields.mdRelated Issues
Closes #10684
Documentation
The new documentation covers:
The documentation emphasizes the importance of using defaultProps for labels to ensure consistency and maintainability across custom field components.