Skip to content

Export to CSV selected rows #510

@Kazmich

Description

@Kazmich

Is there a way to export to csv only selected rows?
I collect selected rows with this function:
var selectedRows = []; function onRowSelect(row, isSelected) { if (isSelected) { selectedRows.push(row); } else { selectedRows.splice(selectedRows.indexOf(row), 1); } }

Can I somehow pass those to CSVExportButton? Maybe using its onExport() method?
<ToolkitProvider keyField="Id" data={this.state.products} columns={columns} exportCSV > {props => ( <div> <ExportCSVButton {...props.csvProps} className="btn btn-primary" > Export CSV </ExportCSVButton>

Can't find any example of this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions