colvis + fixed columns overlap issue
colvis + fixed columns overlap issue
bikramjitc
Posts: 6Questions: 0Answers: 0
in FixedColumns
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
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.
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
It works. Thanks for the prompt response.
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.
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 thefixedColumns().right()
methods.Thanks,
Sandy
@sandy, thanks for providing the quick solution.