Created
February 12, 2017 10:46
-
-
Save AllenFang/d4ff4ae508ebb7b45e5bb5f1bb5a396d 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
| function enumFormatter(cell, row, enumObject) { | |
| return enumObject[cell]; | |
| } | |
| class SelectFilter extends React.Component { | |
| render() { | |
| return ( | |
| <BootstrapTable data={ products }> | |
| <TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn> | |
| <TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn> | |
| <TableHeaderColumn dataField='quality' filterFormatted dataFormat={ enumFormatter } formatExtraData={ qualityType } | |
| filter={ { type: 'SelectFilter', options: qualityType, selectText: 'Choose' } }>Product Quality</TableHeaderColumn> | |
| </BootstrapTable> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment