.column.adjust() is not working on the table with fixed header rows and first column and scroll X&Y

.column.adjust() is not working on the table with fixed header rows and first column and scroll X&Y

phatozphatoz Posts: 3Questions: 1Answers: 0

Link to test case: https://live.datatables.net/voqamisa/5/
Debugger code (debug.datatables.net): n/a
Error messages shown: n/a
Description of problem: .column.adjust() is not working on the table with fixed header rows and first column and scroll X&Y.

The first column in the thead rows is not aligned with the first column in the tbody rows. Calling .columns.adjust() doesn't seem to redraw the thead elements to match the rest of the table.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Thank you for posting this - I'll look into it. Interestingly it works as expected if you have ordering enabled. That makes me think it will have something to do with the CSS padding in the header.

    Allan

  • phatozphatoz Posts: 3Questions: 1Answers: 0

    Thank you for looking at it and responding. I will also check to see if adjusting the padding will resolve it.

  • phatozphatoz Posts: 3Questions: 1Answers: 0

    Thank you for the tip! I found the issue. It was the width: 25vw; in the styles.css.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Ah interesting! Thanks for letting me know.

    Allan

Sign In or Register to comment.