Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with table width #1585

Closed
foreveRush opened this issue Sep 4, 2017 · 2 comments
Closed

Trouble with table width #1585

foreveRush opened this issue Sep 4, 2017 · 2 comments

Comments

@foreveRush
Copy link

I use react-bootstrap-table and need the vertical scroll. My code:

<BootstrapTable data={products} hover>
      <TableHeaderColumn isKey dataField='id' width='10%'>
          Product ID
      </TableHeaderColumn>
      <TableHeaderColumn dataField='name'>
          Product Name
      </TableHeaderColumn>
      <TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
</BootstrapTable>

This code works fine and I get the auto width resizable table. After that, I added next key:
<BootstrapTable data={products} hover height='200px'>
and got the problem with 100% width, instead of resizing table width I got one more scroll like in the picture below:
peek 2017-09-01 18-07

How can I fix this?

@AllenFang
Copy link
Owner

ah.. it's a known issue before for fixing some unalign issue.. Because react-bootstrap-table will adjust column width when vertical scroll bar existing, but there's a tricy way to avoid this dynamic adjust, you can add printable on BootstrapTable

@foreveRush
Copy link
Author

Thanks, adding printable on BootstrapTable helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants