I'm trying to trigger my exportCSV from a different component outside of the TookkilProvider
... is that possible? I did see some reference to this.refs.table.handleExportCSV();
here, but I can't seem to find that function
My code is below:
<ToolkitProvider
keyField="id"
data={[...data]}
columns={Columns}
exportCSV={{ onlyExportFiltered: true, exportAll: false }}
search
>
{
props => (
<div>
<MyExportCSV {...props.csvProps} />
<hr />
<BootstrapTable keyField='id'
{...props.baseProps}
pagination={paginationFactory(options)} expandRow={expandRow}
ref={n => node = n} />
</div>
)
}
</ToolkitProvider>
handleExportCSV()
method from a different components, you must throwBootstrapTable ref
to this components throught props.handleExportCSV
available only in old version ofreact-bootstrap-table
, in new version you must useonExport()
. Demo react-bootstrap-table.github.io/react-bootstrap-table2/…Toolkit
how do I export the props from the toolkit so i can call it from somewhere else, ref on the table doesn't seem to be it