I have a normal table in react js that is generated like so (this is just an extract for generating the the td elements other code is a class that is called CompanyList that is a react component that renders the table;
import React from 'react';
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { Line } from 'react-chartjs-2';
import { actionCreators as companiesActionCreators } from '../../reducers/companies'
import { getSelectedAndFilteredCompanies, getChartData } from '../../selectors/companies';
import DropBox from '../DropBox'
import { getRevenueSelectedRange, getTotalAssetsSelectedRange } from '../../selectors/companies'
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css';
import BootstrapTable from 'react-bootstrap-table-next';
const Company = ({ company, selectCompany, deselectCompany }) => (
<tr>
<td><input type='checkbox' checked={company.selected} onChange={() => company.selected ? deselectCompany(company.id) : selectCompany(company.id)} /></td>
<td>{ company['Company Name'] }</td>
<td>{ company['Revenue bucket'] }</td>
<td>{ company['Current Yield'] }</td>
<td>{ company['Sector'] }</td>
<td>{ company['Revenue bucket'] }</td>
<td>{ company['Revenue 2007'] }</td>
<td>{ company['Company Name'] }</td>
<td>{ company['Company Name'] }</td>
</tr>
);
However I want to convert this table to use the react js plugin react-bootstrap-table-2 but after reading the docs I am unsure whether my products array should be like this;
products = [{ 'Name' : { company['Company Name'] } , 'checkbox' : <input type='checkbox' checked={company.selected} onChange={() => company.selected ? deselectCompany(company.id) : selectCompany(company.id)} /> }]