How to Fix the Columns Position in Lightning Datatable?

 

How to Fix the Columns Position in Lightning Datatable

Sample Style :

.THIS .tableDiv {
max-width: 100em !important;
max-height: 20em !important;
overflow: scroll;
position: relative;
}
.THIS table {
position: relative;
border-collapse: collapse;
}
.THIS td {
padding: 0.25em;
}
.THIS th {
padding: 0.25em;
}
.THIS thead th {
position: -webkit-sticky !important;
position: sticky !important;
top: 0;
z-index: 1;
}
.THIS table thead th:first-child {
position: sticky !important;
left: 0;
z-index: 2;
}
.THIS table tbody th {
position: sticky !important;
left: 0;
background: white;
z-index: 1;
}

Follow Us

Posted By : Sudeer Kamat Date :

view_module Related

Comments 0