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

Freeze column functionality

Open Botsy opened this issue 7 years ago • 6 comments

Hello @AllenFang,

We are currently using react-bootstrap-table in a project and everything is working perfectly but we really need the freeze column functionality and we're wondering if it is planned to be implemented in react-bootstrap-table2 ?

Thanks

Botsy avatar Jun 19 '18 10:06 Botsy

@Botsy I will consider to implement it, not it's still not in my radar. Currently, I still work on recovering all the functionality from legacy react-bootstrap-table. so PR is welcome :)

AllenFang avatar Jun 20 '18 15:06 AllenFang

Use the following CSS to Freeze the column

.react-bootstrap-table table > tbody > tr > td:nth-child(1), .react-bootstrap-table table > thead > tr:nth-child(1) > th:nth-child(1) { background-color: #ccc; position: sticky; position: -webkit-sticky; left:0; z-index:1; }

Anjlit avatar Nov 17 '18 11:11 Anjlit

Use the following CSS to Freeze the column

.react-bootstrap-table table > tbody > tr > td:nth-child(1), .react-bootstrap-table table > thead > tr:nth-child(1) > th:nth-child(1) { background-color: #ccc; position: sticky; position: -webkit-sticky; left:0; z-index:1; }

does not work in IE, position: sticky is not available there

akparaliev avatar Feb 21 '19 13:02 akparaliev

is this updated in react-bootstrap-table2 ???????

itskrishnadev avatar May 26 '20 08:05 itskrishnadev

<TableHeaderColumn dataField='xyz' dataAlign="center" tdStyle={{ whiteSpace: 'normal', backgroundColor: '#ccc', position: 'sticky', left: 0, zIindex: 1 }} thStyle={{ whiteSpace: 'normal', backgroundColor: '#ccc', position: 'sticky', left: 0, zIindex: 1 }} >XYZ</TableHeaderColumn> This can be used to make the column fixed.

sudhacholla123 avatar Feb 08 '21 10:02 sudhacholla123

tdStyle={{ whiteSpace: 'normal', backgroundColor: '#ccc', position: 'sticky', left: 0, zIindex: 1 }} thStyle={{ whiteSpace: 'normal', backgroundColor: '#ccc', position: 'sticky', left: 0, zIindex: 1 }}

its working if only first column needs to be sticky

haseeb-lab avatar May 20 '22 13:05 haseeb-lab