Created
November 15, 2016 12:47
-
-
Save AllenFang/faaf03ebcd6e5a23c71d35df1501adc9 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 DefaultCustomSearchFieldTable extends React.Component { | |
| createCustomSearchField = (props) => { | |
| return ( | |
| <SearchField | |
| className='my-custom-class' | |
| defaultValue={ props.defaultSearch } | |
| placeholder={ props.searchPlaceholder }/> | |
| ); | |
| } | |
| render() { | |
| const options = { | |
| clearSearch: true, | |
| searchField: this.createCustomSearchField | |
| }; | |
| return ( | |
| <BootstrapTable data={ products } options={ options } 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