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 } |
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 SelectFilterWithCondition extends React.Component { | |
| render() { | |
| return ( | |
| <BootstrapTable data={ products }> | |
| <TableHeaderColumn dataField='id'>Product ID</TableHeaderColumn> | |
| <TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn> | |
| <TableHeaderColumn dataField='quality' filter={ { type: 'SelectFilter', options: qualityType, condition: 'eq' } }>Product Quality</TableHeaderColumn> | |
| </BootstrapTable> | |
| ); | |
| } |
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 TextFilterWithCondition extends React.Component { | |
| render() { | |
| return ( | |
| <BootstrapTable data={ products }> | |
| <TableHeaderColumn dataField='id' isKey>Product ID</TableHeaderColumn> | |
| <TableHeaderColumn dataField='name' filter={ { type: 'TextFilter', delay: 1000, condition: 'eq' } }>Product Name</TableHeaderColumn> | |
| <TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn> | |
| </BootstrapTable> | |
| ); | |
| } |
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 ColumnStyleTable extends React.Component { | |
| render() { | |
| return ( | |
| <BootstrapTable data={ products }> | |
| <TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn> | |
| <TableHeaderColumn dataField='name' tdStyle={ { whiteSpace: 'normal' } }>Product Name</TableHeaderColumn> | |
| <TableHeaderColumn dataField='price' thStyle={ { 'fontWeight': 'lighter' } }>Product Price</TableHeaderColumn> | |
| </BootstrapTable> | |
| ); | |
| } |
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 ExternalMultiSort extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| sortName: [], | |
| sortOrder: [] | |
| }; | |
| this.onSortChange = this.onSortChange.bind(this); | |
| this.cleanSort = this.cleanSort.bind(this); |
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 MultiSortTable extends React.Component { | |
| render() { | |
| return ( | |
| <div> | |
| <BootstrapTable ref='table' data={ products } multiColumnSort={ 2 }> | |
| <TableHeaderColumn dataField='id' isKey={ true } dataSort={ true }>Product ID</TableHeaderColumn> | |
| <TableHeaderColumn dataField='name' dataSort={ true }>Product Name</TableHeaderColumn> | |
| <TableHeaderColumn dataField='price' dataSort={ true }>Product Price</TableHeaderColumn> | |
| </BootstrapTable> | |
| </div> |
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 CustomPaginationPanel extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| renderPaginationPanel = (props) => { | |
| return ( | |
| <div> | |
| <div>{ props.components.pageList }</div> | |
| <div> |
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 CustomSizePerPageDropDown extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| onToggleDropDown = (toggleDropDown) => { | |
| // do your stuff here | |
| console.log('toggle dropdown'); | |
| toggleDropDown(); | |
| } |
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 LeftSearchPanel extends React.Component { | |
| render() { | |
| const options = { | |
| searchPosition: 'left' // right or left | |
| }; | |
| return ( | |
| <BootstrapTable data={ products } | |
| options={ options } | |
| search> |
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> |