Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixed column in ReactTable component

Could we fix a column when we get a horizontal column with smaller pages?

For example could we fix the column firstName in this example.

Cheers!!

like image 836
bhb Avatar asked Jan 03 '18 15:01

bhb


People also ask

What is a fixed column?

Fixed columns, when they exist in a table, are always visible and are separated from the other columns by a vertical orange line. Fixed columns do not scroll off the page, regardless of how far the table is scrolled in either direction.

How do you adjust column width in react?

Turn column resizing on for the grid by setting resizable=true for each column. To set resizing for each column, set resizable=true on the default column definition.


1 Answers

react-table does not support fixed columns, issue is opened Sticky columns. But there is already implemented workaround, you can find sources github or npm package (link taken from thread Sticky columns). Online Demo. Thanks to GuillaumeJasmin.

like image 113
Alex Avatar answered Oct 10 '22 13:10

Alex