PRO "hiddenColumns" version 1.7.0 hides different columns

Tags: #<Tag:0x00007efc71a441f0>

I upgraded to version 1.7.4 and If manualColumnMove is enable, hiddenColumns are not hiding the same columns as previous version to 1.7.x, here is the JSFiddle.

http://jsfiddle.net/gvazq82/e1ke4k6f/

{
  colHeaders: ['A', 'B', 'C', 'D', 'E', 'F'],
  manualColumnMove: [0,1,2,4,3],
  manualColumnResize: [50, 50, null, 50, null, null],
  colWidths: [10, 10,null, 20, null, null],
  hiddenColumns: {
    "columns": [3]
  }
}

Until version 1.6.0: The hidden column was “D”.
After Version 1.6.0: The hidden column is “E”.

It seems the issue is because the position from configuration was taking the order of the column when created, but after 1.6.0 it is taking the position after the columns were moved. I could not find any of the release notes something related to this change.

Since the table has not been initialized, I don’t have a way to call “toVisualColumn” or “toPhysicalColumn” to retrieve the correct index to hide during the initialization.

Do you have a fix or workaround for this?

it’s related to a change made in 1.7.0:

We've refactored the Manual Column Move plugin to allow the user to move multiple columns at once. This made some backward-incompatible changes. For example the beforeColumnMove and afterColumnMove hooks had their arguments changed.

Thanks for the response @aleksandra_budnik, I understand that change, but that does not said anything about initialization and how that was affected, It would be nice if more information is provided in the release notes.

FYI, I solved this issue not passing the columns during initialization and instead applying the hidden columns after the table was created, to have access to the methods “toVisualColumn”, this is requiring now an additional render, but so far that is my workaround.