Fixed column issues

Fixed column issues

Chris230291Chris230291 Posts: 34Questions: 10Answers: 1
edited October 2021 in General

Hello. I am playing with fixed columns. I am having some issues though. First of all the headers disappear and secondly the scrolling column is overlapping the first on scroll. It also messes with styling (the white rows).

http://live.datatables.net/rovubece/2/edit

Can anyone see what is going wrong?

Thanks,
Chris

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @Chris230291 ,

    This isn't something that happens in our standard BS5 example. This must be to do with how BS5 layers different elements. If you add a z-index rule for fixed left columns then it keeps them at the front - see this change to your example.

    Thanks,
    Sandy

  • Chris230291Chris230291 Posts: 34Questions: 10Answers: 1

    Thanks for the reply. That sorts out one of the issues. Can anyone help with any of the others?

    • The header is messed up/gone.
    • The striping rows turn white when it should be dark.
    • There is a white line down the left side and a small line on the right,

    I have changed the background to help show the problems.

    http://live.datatables.net/zimajeli/2/

  • Chris230291Chris230291 Posts: 34Questions: 10Answers: 1

    I think I have figured it out with css. But should I have to do this?

    td.dtfc-fixed-left {
      z-index:2
    }
    tr.even td {
        background-color: #212529 !important;
    }
    table.dataTable th {
        background-color: transparent !important;
    }
    div.dataTables_scrollBody {
        border-left: 0px !important;
    }
    
    div.dtfc-right-top-blocker{
      background-color: transparent !important;
    }
    
  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @Chris230291 ,

    The BS5 styling that you are using uses css variables, which is not something that we support yet. So for now, yes, you will have to set the above css if you are straying away from the default styling.

    This is something that we are looking to support in the future, but for now there are other things that we are focusing on.

    Thanks,
    Sandy

Sign In or Register to comment.