colvis + fixed columns overlap issue

colvis + fixed columns overlap issue

bikramjitcbikramjitc Posts: 6Questions: 0Answers: 0

Link to test case: http://live.datatables.net/xirefiko/2/edit
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: If we turn off the visibility of the middle columns of a set of fixed columns then the adjacent(fixed+visible) columns overlap when scrolled.

Replies

  • bikramjitcbikramjitc Posts: 6Questions: 0Answers: 0

    e.g. In the test case, if we turn the visibility of the column "Position" off and then scroll horizontally then the "Office" column overlaps the "last name" column. But the first five columns are fixed.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    That was addressed recently, and has been resolved in the nightly builds - see your example updated here. Can you take a look and see if that fixes the issue, please. We're aiming on release the update in the next couple of weeks,

    Colin

  • bikramjitcbikramjitc Posts: 6Questions: 0Answers: 0

    It works. Thanks for the prompt response.

  • bikramjitcbikramjitc Posts: 6Questions: 0Answers: 0

    One thing I noticed that now the number of visible fixed columns remains same even if some of the fixed columns are turned invisible. That means only the consecutive visible no. of columns shall be fixed.
    I think the older way to fix the actual order of columns was also okay without the overlapping issue.

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @bikramjitc ,

    Yes this is actually a design change that we have made recently. You can see the discussion that led to it here. We think that it makes more sense to have the number of fixed columns set in the initialisation only be applied to visible columns.

    For what you are describing here, you would have to decrease the number of fixed columns when the column visibility is changed. To do this you would use the fixedColumns().left() and/or the fixedColumns().right() methods.

    Thanks,
    Sandy

  • bikramjitcbikramjitc Posts: 6Questions: 0Answers: 0

    @sandy, thanks for providing the quick solution.

Sign In or Register to comment.