Skip to content

Commit

Permalink
Write doc for the new ExportButton
Browse files Browse the repository at this point in the history
  • Loading branch information
Luwangel committed Dec 4, 2018
1 parent bf24baf commit 3419db6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/List.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ const PostActions = ({
onUnselectItems,
resource,
selectedIds,
showFilter
showFilter,
total
}) => (
<CardActions>
{bulkActions && React.cloneElement(bulkActions, {
Expand All @@ -119,6 +120,7 @@ const PostActions = ({
}) }
<CreateButton basePath={basePath} />
<ExportButton
disabled={total === 0}
resource={resource}
sort={currentSort}
filter={filterValues}
Expand Down Expand Up @@ -149,7 +151,9 @@ export const PostList = ({ permissions, ...props }) => (

### Exporter

Among the default list actions, react-admin includes an `<ExportButton>`. By default, clicking this button will:
Among the default list actions, react-admin includes an `<ExportButton>`. This button is disabled when there is no record in the current `<List>`.

By default, clicking this button will:

1. Call the `dataProvider` with the current sort and filter (but without pagination),
2. Transform the result into a CSV string,
Expand Down

0 comments on commit 3419db6

Please sign in to comment.