Skip to content

Instantly share code, notes, and snippets.

@AllenFang
Created November 14, 2016 15:36
Show Gist options
  • Select an option

  • Save AllenFang/4589e7f9b41be87f4b3c82d47e0884a6 to your computer and use it in GitHub Desktop.

Select an option

Save AllenFang/4589e7f9b41be87f4b3c82d47e0884a6 to your computer and use it in GitHub Desktop.
class FullyCustomInsertButtonTable extends React.Component {
createCustomExportCSVButton = (onClick) => {
return (
<button style={ { color: 'red' } } onClick={ onClick }>Custom Export CSV Btn</button>
);
}
render() {
const options = {
exportCSVBtn: this.createCustomExportCSVButton
};
return (
<BootstrapTable data={ products } options={ options } exportCSV>
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
</BootstrapTable>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment