The column after the FixedColumn shows under the fixed column.

The column after the FixedColumn shows under the fixed column.

akapedakaped Posts: 2Questions: 1Answers: 0
edited May 2019 in Free community support

Hello everyone. I'm trying to use datatables to represent aligned nucleotides sequences.
I followed the instructions given in: https://datatables.net/extensions/fixedcolumns/examples/styling/bootstrap.html
to set up my own datatables with bootstrap look and fixed column.

My issue is the following: The column after the fixed one goes behind the fixed column.
Here is my fiddle with my very visible problem: http://jsfiddle.net/fu0ogva6/
This problem occours only when the table class=" nowrap " is used. Otherwise the table is displayed very fine.

Thanks for your help.

Answers

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

    Hi @akaped ,

    Yep, I've simplified that test case (thanks for that) here, and it's still showing the issue. We'll scratch our head and get back to you,

    Cheers,

    Colin

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    I think this is actually more of a DataTables core issue - http://jsfiddle.net/34y8j6q5/ (without FixedColumns).

    The massive string shown in the last column is causing some problems with the column alignment when scrolling.

    I'm honestly not sure how to fix this at the moment so its not going to be a quick fix. Column alignment when scrolling is something that I've easily spent the most time on in DataTables debugging - I thought it was sorted, but apparently not for massive strings.

    Allan

  • akapedakaped Posts: 2Questions: 1Answers: 0

    Dear @colin and @allan , thank you very much for your reply.
    How can I help you to sort this out ? I'm new to datatables and I'm not a javascript superuser :smile:.

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

    Hi @akaped ,

    As Allan said it's likely to be hard to fix, and won't be done in the immediate future as columns of such long widths are very rare edge cases. We focus development on the issues that affects most users.

    The only option I can think of for you is to disable the horizontal scrolling within DataTables, don't use FixedColumns, and place the table within a scrollable container like this. That works fairly well.

    You could even mimic FixedColumns by duplicating the same table twice, have them side-by-side and use visible to hide specific columns in either table. The left table could have columns that only shows what you want fixed (so no scroll on the container), and the other table only shows the long column (with the scroll like above).

    Hope that gives you some options,

    Cheers,

    Colin

This discussion has been closed.