Using ScrollX/Y Prevents Hiding/Showing Columns

Using ScrollX/Y Prevents Hiding/Showing Columns

NMcCloudNMcCloud Posts: 15Questions: 7Answers: 0
edited May 2015 in Bug reports

If the table has scrollX/scrollYdefined, it prevents the columns from being hidden then shown again.

The bin below shows the error. When first displayed, the last two columns are hidden using column().visible(), then, five seconds later, they are shown again. The error occurs when the visible method is called. The visibleColumns array is being increased before the headerCells array is, which is causing the error.

In _fnAdjustColumnSizing, _fnCalculateColumnWidths is called before _fnScrollDraw. The issue is that _fnScrollDraw adds back the column to the scroll bodies hidden thead element, but _fnCalculateColumnWidths is expecting that column to already be there, which it isn't.

Simply moving _fnScrollDraw above _fnCalculateColumnWidths seems to fix the issue. Not entirely sure if _fnScrollDraw should be split into two parts, one to be called before the calculation, and one after.





This discussion has been closed.