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

[Docs] Fix List examples #5658

Merged
merged 2 commits into from
Dec 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/List.md
Original file line number Diff line number Diff line change
Expand Up @@ -1759,8 +1759,7 @@ export const PaginationActions = props => <RaPaginationActions {...props} color=
export const Pagination = props => <RaPagination {...props} ActionsComponent={PaginationActions} />;

export const UserList = props => (
<List {...props} pagination={<Pagination />}>
</List>
<List {...props} pagination={<Pagination />} />
WiXSL marked this conversation as resolved.
Show resolved Hide resolved
);
```

Expand Down Expand Up @@ -1799,6 +1798,7 @@ You can use `ListBase` to create your own custom List component, like this one:

```jsx
import * as React from 'react';
import { cloneElement } from 'react';
import {
Datagrid,
ListBase,
Expand All @@ -1817,7 +1817,7 @@ const PostList = props => (
</MyList>
);

const MyList = props => (
const MyList = ({children, ...props}) => (
<ListBase {...props}>
<h1>{props.title}</h1>
<ListToolbar
Expand Down