React-table: horizontal scroll

Created on 27 Nov 2017  路  2Comments  路  Source: tannerlinsley/react-table

Hi there,

I've looked through the props and issues, and I could just be missing something. Is there a way to set a width and overflow for the table so that the table can be scrollable horizontally, or will I have to do that with CSS?

Thanks.

Most helpful comment

The columns autosize to fit the width. If you size the columns beyond what can fit, the horizontal scroll will automatically be enabled. The table is designed to be "responsive" and does not support setting a horizontal width. However, each column allows for a width property - which you could set to various amounts that would cause the scroll to kick in.

Please also consider joining the #react-table Slack channel (badge in the README in the doco) as the github issues are for broken code or feature requests. Thanks.

All 2 comments

The columns autosize to fit the width. If you size the columns beyond what can fit, the horizontal scroll will automatically be enabled. The table is designed to be "responsive" and does not support setting a horizontal width. However, each column allows for a width property - which you could set to various amounts that would cause the scroll to kick in.

Please also consider joining the #react-table Slack channel (badge in the README in the doco) as the github issues are for broken code or feature requests. Thanks.

See https://codesandbox.io/s/oo9j4z1139 for my implementation of the horizontal scroll.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Paul6552 picture Paul6552  路  35Comments

vaidsu picture vaidsu  路  29Comments

BenMGilman picture BenMGilman  路  22Comments

nikhilem picture nikhilem  路  27Comments

ggascoigne picture ggascoigne  路  18Comments