Skip to content

Commit

Permalink
docs (List): clarifies accepted List props
Browse files Browse the repository at this point in the history
  • Loading branch information
f-jost committed Feb 11, 2021
1 parent e0de8c3 commit 15d72ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
28 changes: 8 additions & 20 deletions docs/List.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ The `<List>` component fetches the list of records from the data provider, and r

Here is the minimal code necessary to display a list of posts using a `<Datagrid>`:

* [`title`](#title)
* [`actions`](#actions)
* [`exporter`](#exporter)
* [`bulkActionButtons`](#bulkactionbuttons)
* [`filters`](#filters-filter-inputs) (a React element used to display the filter form)
* [`filterDefaultValues`](#filterdefaultvalues) (the default values for `alwaysOn` filters)
* [`perPage`](#perpage-pagination-size)
* [`sort`](#sort-default-sort-field--order)
* [`filter`](#filter-permanent-filter) (the permanent filter used in the REST request)
* [`pagination`](#pagination-pagination-component)
* [`aside`](#aside-aside-component)
* [`empty`](#empty-empty-page-component)
* [`syncWithLocation`](#synchronize-with-url)

```jsx
// in src/posts.js
import * as React from "react";
Expand Down Expand Up @@ -70,18 +56,20 @@ That's enough to display a basic post list, with functional sort and pagination:

Here are all the props accepted by the `<List>` component:

* [`title`](#title)
* [`actions`](#actions)
* [`exporter`](#exporter)
* [`aside`](#aside-aside-component)
* [`bulkActionButtons`](#bulkactionbuttons)
* [`filters`](#filters-filter-inputs) (a React element used to display the filter form)
* [`component`](#component)
* [`empty`](#empty-empty-page-component)
* [`exporter`](#exporter)
* [`filter`](#filter-permanent-filter) (the permanent filter used in the REST request)
* [`filterDefaultValues`](#filterdefaultvalues) (the default values for `alwaysOn` filters)
* [`filters`](#filters-filter-inputs) (a React element used to display the filter form)
* [`pagination`](#pagination-pagination-component)
* [`perPage`](#perpage-pagination-size)
* [`sort`](#sort-default-sort-field--order)
* [`pagination`](#pagination-pagination-component)
* [`aside`](#aside-aside-component)
* [`empty`](#empty-empty-page-component)
* [`title`](#title)
* [`syncWithLocation`](#synchronize-with-url)

### `title`

Expand Down
5 changes: 5 additions & 0 deletions packages/ra-ui-materialui/src/list/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ import { ListProps } from '../types';
*
* - actions
* - aside
* - bulkActionButtons
* - component
* - empty
* - exporter
* - filter (the permanent filter to apply to the query)
* - filterDefaultValues (the default values for `alwaysOn` filters)
* - filters (a React component used to display the filter form)
* - pagination
* - perPage
* - sort
* - title
* - syncWithLocation
*
* @example
*
Expand Down

0 comments on commit 15d72ee

Please sign in to comment.