react-bootstrap-table / react-bootstrap-table2

Next Generation of react-bootstrap-table
https://react-bootstrap-table.github.io/react-bootstrap-table2/
MIT License
1.27k stars 431 forks source link

How to convert table into using react bootstrap table2 #368

Open mayurpande opened 6 years ago

mayurpande commented 6 years ago

How would I convert a normal table into it a scrollable table?

My current table is as follows;

              {
                this.props.companies.length > 0 && (
                    <table>
                      <thead>
                        <tr>
                          <th></th>
                          <th>Name</th>
                          <th>Issuance Size</th>
                          <th>Current Yield</th>
                          <th>Sector</th>
                          <th>Revenue</th>
                          <th>Intrest to Cash flow coverage</th>
                          <th>Cash flow to debt ratio</th>
                          <th>Time left</th>
                        </tr>
                      </thead>
                      <tbody>
                        {
                          this.props.companies.map((company, index) => <ConnectedCompany key={company.id} company={company} />)
                        }
                      </tbody>
                    </table>
                )
              }
mayurpande commented 6 years ago

Is some thing like this valid;

products = [{ 'Name' : { company['Company Name'] } , 'checkbox' : <input type='checkbox' checked={company.selected} onChange={() => company.selected ? deselectCompany(company.id) : selectCompany(company.id)} /> }]

AllenFang commented 6 years ago

@mayurpande hello, we don't support the scrollable table right now, will consider to implement it.

mayurpande commented 6 years ago

@AllenFang ah ok, nevermind, I may use the old version for now then. Is this the correct way that I have set it up?

AllenFang commented 6 years ago

@mayurpande sure, you can use old one, but I already didn't maintain the old one. But I think old one is still stable :)