react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

Implement first column as sticky when table scrolls horizontally

Open prajapati-parth opened this issue 8 years ago • 5 comments

Hi @AllenFang, Making the first column sticky would really help when the table scrolls horizontally so that a reference to the rows can be seen while scrolling as the first column is generally used to hold the identifying element of a particular row data.

A similar example here

I've already implemented it in the fork of react-bootstrap-table. I think this would be a good feature for react-bootstrap-table2.

prajapati-parth avatar Aug 28 '17 04:08 prajapati-parth

Hi @prajapati-parth thanks for this suggestion, it's really useful when we have large columns. I'll consider to implement it when we finish the basic component structure in react-bootstrap-table2

Thanks

AllenFang avatar Aug 28 '17 07:08 AllenFang

@AllenFang is this feature implemented ?

sgwcollins avatar Dec 07 '18 16:12 sgwcollins

I will be waiting for this!!!

dailymp avatar Jul 19 '19 09:07 dailymp

waiting for this feature..

kaleem-elahi avatar Dec 02 '20 14:12 kaleem-elahi

this worked for me thanks to https://github.com/AllenFang/react-bootstrap-table/issues/723#issuecomment-814783985

`.stickyFirstColumn { /* style for the stick, fixed column*/ .react-bootstrap-table > table > tbody > tr > td:nth-child(1), .react-bootstrap-table > table > thead > tr:nth-child(1) > th:nth-child(1) { position: sticky; position: -webkit-sticky; left: 0; z-index: 2; }

/*keeping proper row & td colors */ .react-bootstrap-table > table > tbody > tr{ background-color: #fff; td { background-color: #fff; } &:hover { cursor: pointer; background: #f6f9fc; td { background-color: #f6f9fc; } } }

/keeping columns aligned during scrolling/ .react-bootstrap-table { max-width: 100%; overflow: overlay !important; } }`

pratikw-iprogrammer avatar Nov 28 '23 07:11 pratikw-iprogrammer