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

Add ability to pass multiple children to <List> and <Create> #8533

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Dec 22, 2022

Problem

It's not possible to pass utility components as children of <List> in addition to a <Datagrid>. In particular, I need to pass a <ListLiveUpdate> component to watch for real-time changes in the list, and it needs access to the ListContext.

Solution

Change the accepted type and proptype

const PostList = () => (
  <List>
    <ListLiveUpdate />
    <Datagrid>
      // ...
    </Datagrid>
  </List>
);

Other page components (<Edit> and <Show>) already allow that.

@slax57 slax57 added this to the 4.7.0 milestone Dec 22, 2022
@slax57 slax57 merged commit e6b9cec into next Dec 22, 2022
@slax57 slax57 deleted the list-multiple-children branch December 22, 2022 14:57
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