Skip to content

ExportButton

Exports the current list, with filters applied, but without pagination.

It relies on the exporter function passed to the <List> component, via the ListContext. It’s disabled for empty lists.

By default, the <ExportButton> is included in the List actions.

You can add it to a custom actions toolbar:

import { CreateButton, ExportButton, TopToolbar } from '@/components/admin';
const PostListActions = () => (
<>
<FilterButton />
<CreateButton />
<ExportButton />
</>
);
export const PostList = () => (
<List actions={<PostListActions />}>
...
</List>
);

It calls dataProvider.getList() with perPage=maxResults then invokes exporter(data, fetchRelatedRecords, dataProvider, resource).

PropRequiredTypeDefaultDescription
classNameOptionalstringcursor-pointerExtra classes
exporterOptionalExporterFrom ListContextCustom exporter function
iconOptionalReactNodeDownload iconCustom icon
labelOptionalstringra.action.exporti18n key
maxResultsOptionalnumber1000Max records to fetch
metaOptionalany-Provider meta parameter
onClickOptional(e)=>void-Extra click handler