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

Update <SimpleList> to fallback to recordRepresentation when not given primaryText #9172

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Aug 10, 2023

Problem

In most cases, the primaryText of a SimpleList is the resource's resordRepresentation. If feels repetitive to have to pass an explicit value to this prop.

Solution

Default to recordRepresentation so we can do the following:

Const PostList = () => (
  <List>
    <SimpleList />
  </List>
)

I took the opportunity to include the follow-up to #8925 (deprecating the rowStyle prop in favor of rowSx).

docs/SimpleList.md Show resolved Hide resolved
docs/SimpleList.md Outdated Show resolved Hide resolved
docs/SimpleList.md Outdated Show resolved Hide resolved
docs/Datagrid.md Outdated Show resolved Hide resolved
docs/Datagrid.md Outdated Show resolved Hide resolved
docs/Datagrid.md Outdated Show resolved Hide resolved
fzaninotto and others added 2 commits August 11, 2023 09:49
Co-authored-by: adrien guernier <adrien@marmelab.com>
@adguernier adguernier added this to the 4.13.0 milestone Aug 11, 2023
@adguernier adguernier merged commit b6dc572 into next Aug 11, 2023
8 checks passed
@adguernier adguernier deleted the simplelist-no-primary-text branch August 11, 2023 07:59
@fzaninotto fzaninotto changed the title Add ability to use SimpleList without primaryText Add ability to use <SimpleList> without primaryText Aug 14, 2023
@fzaninotto fzaninotto changed the title Add ability to use <SimpleList> without primaryText Update <SimpleList> to fallback to recordRepresentation when not given primaryText Aug 14, 2023
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.

2 participants