Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BC Break] Add ReferenceOneField #7060

Merged
merged 6 commits into from
Jan 10, 2022
Merged

[BC Break] Add ReferenceOneField #7060

merged 6 commits into from
Jan 10, 2022

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Jan 7, 2022

Problem

I started documenting the react-admin ReferenceXXXfFields, and found ReferenceOne to be a missing spot in our strategy.

Solution

  • Remove props injection in ReferenceField
  • Add ReferenceOneField (and the useReferenceOneFieldController), reusing the view from <ReferenceField>
  • Add documentation for relationship types and the react-admin solutions to handle them

@fzaninotto fzaninotto added the RFR Ready For Review label Jan 7, 2022
@fzaninotto fzaninotto added this to the 4.0.0-alpha.2 milestone Jan 7, 2022
docs/FieldsForRelationships.md Outdated Show resolved Hide resolved
docs/FieldsForRelationships.md Outdated Show resolved Hide resolved
docs/FieldsForRelationships.md Outdated Show resolved Hide resolved
docs/FieldsForRelationships.md Outdated Show resolved Hide resolved
docs/FieldsForRelationships.md Outdated Show resolved Hide resolved
docs/FieldsForRelationships.md Outdated Show resolved Hide resolved
Copy link
Contributor

@WiXSL WiXSL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ColoredNumberField component in the demo is also using record as a prop instead of taking it from the context

@WiXSL
Copy link
Contributor

WiXSL commented Jan 7, 2022

Finish review.
The new documentation explaining in detail the relationships fields looks great!

@fzaninotto fzaninotto merged commit cf6718e into next Jan 10, 2022
@fzaninotto fzaninotto deleted the ReferenceOneField branch January 10, 2022 08:29
@fzaninotto fzaninotto mentioned this pull request Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants