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 ComplexHeaderGroup extends React.Component { | |
| render() { | |
| const selectRow = { | |
| mode: 'checkbox', | |
| bgColor: 'rgb(238, 193, 213)' | |
| }; | |
| const cellEdit = { | |
| mode: 'click', | |
| blurToSave: true |
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 SimpleHeaderGroupTable extends React.Component { | |
| render() { | |
| return ( | |
| <BootstrapTable data={ products }> | |
| <TableHeaderColumn row='0' rowSpan='2' dataField='id' isKey>ID</TableHeaderColumn> | |
| <TableHeaderColumn row='0' colSpan='2'>Product</TableHeaderColumn> | |
| <TableHeaderColumn row='1' dataField='name'>Name</TableHeaderColumn> | |
| <TableHeaderColumn row='1' dataField='price'>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 FullyCustomSizePerPageDropDown extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| renderSizePerPageDropDown = props => { | |
| return ( | |
| <div className='btn-group'> | |
| { | |
| [ 10, 25, 30 ].map((n, idx) => { |
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
| // validator function pass the user input value and should return true|false. | |
| function jobNameValidator(value) { | |
| const response = { isValid: true, notification: { type: 'success', msg: '', title: '' } }; | |
| if (!value) { | |
| response.isValid = false; | |
| response.notification.type = 'error'; | |
| response.notification.msg = 'Value must be inserted'; | |
| response.notification.title = 'Requested Value'; | |
| } else if (value.length < 10) { | |
| response.isValid = false; |
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 RemoteStoreAlternative extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.products = getProducts(); | |
| this.state = { | |
| data: this.products | |
| }; | |
| } | |
| onCellEdit = (row, fieldName, value) => { |
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 EditColumnClassTable extends React.Component { | |
| render() { | |
| const cellEditProps = { | |
| mode: 'click' | |
| }; | |
| return ( | |
| <BootstrapTable data={ products } cellEdit={ cellEditProps }> | |
| <TableHeaderColumn dataField='id' isKey>Product ID</TableHeaderColumn> | |
| <TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn> | |
| <TableHeaderColumn dataField='price' editColumnClassName='class-for-editing-cell'>Product Price</TableHeaderColumn> |