Created
November 15, 2016 13:11
-
-
Save AllenFang/bf83073aa4320fa7200881e305d9e1e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CustomToolBarTable extends React.Component { | |
| createCustomToolBar = props => { | |
| return ( | |
| <div style={ { margin: '15px' } }> | |
| { props.components.btnGroup } | |
| <div className='col-xs-8 col-sm-4 col-md-4 col-lg-2'> | |
| { props.components.searchPanel } | |
| </div> | |
| </div> | |
| ); | |
| } | |
| render() { | |
| const selectRow = { | |
| mode: 'checkbox', | |
| showOnlySelected: true | |
| }; | |
| const options = { | |
| toolBar: this.createCustomToolBar | |
| }; | |
| return ( | |
| <BootstrapTable data={ products } | |
| options={ options } | |
| selectRow={ selectRow } | |
| insertRow | |
| deleteRow | |
| exportCSV | |
| search> | |
| <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