Skip to content

BulkExportButton

Exports only the currently selected records using dataProvider.getList(). To be used in a ListContext (e.g., inside a <DataTable>).

<BulkExportButton> is one fo the default bulk action buttons of <DataTable>, so you will need to use it only when you want to customize these bulk actions:

import { DataTable, BulkExportButton } from '@/components/admin';
const BulkActions = () => (
<>
<BulkExportButton />
{/* other bulk action buttons */}
</>
);
<DataTable bulkActionsButtons={<BulkActions />}>
{/* table content */}
</DataTable>
PropRequiredTypeDefaultDescription
classNameOptionalstring-Extra CSS classes
exporterOptional(data: any[]) => void-Custom exporter function, used to select or augment the exported data
iconOptionalReactNodeDownload iconCustom icon element
labelOptionalstringra.action.exporti18n key
metaOptionalobject-Custom meta to pass to dataProvider.getList()
resourceOptionalstringinferredResource name (rarely needed)

Additional props are passed to the underlying shadcn/ui <Button> component.

See the <List exporter> documentation for details on the exporter function.