content: /* eslint max-len: 0 */
  /* eslint no-unused-vars: 0 */
  /* eslint no-alert: 0 */
  import React from 'react';
  import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
  
  
  const products = [];
  
  function addProducts(quantity) {
    const startId = products.length;
    for (let i = 0; i < quantity; i++) {
      const id = startId + i;
      products.push({
        id: id,
        name: 'Item name ' + id,
        price: 2100 + i
      });
    }
  }
  
  addProducts(5);
  
  export default class CustomToolBarTable1 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>
      );
    }
  }
  