Datatable header column cell width misaligned while using bootstrap tabs

Datatable header column cell width misaligned while using bootstrap tabs

GopuNGopuN Posts: 1Questions: 1Answers: 0

I'm using angular datatables https://l-lin.github.io/angular-datatables/#/getting-started which is build with jquery datatable.

I've used this table successfully everywhere in my project. But if I'm trying to use within bootstrap tabs then table gets misaligned. Header gets misaligned not matching with body cell.

Second column Agent ID gets misaligned. Also I've tried the code

$($.fn.dataTable.tables(true)).DataTable().columns.adjust();

But there is no effect. Anyone help me to solve this problem.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @GopuN ,

    You also need a draw() after column.adjust - so something like:

    $($.fn.dataTable.tables(true)).DataTable().columns.adjust().draw();
    

    If that doesn't work, please link to a test case or the page. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.