The visual index of the column isn't correct after hide the column

Tags: #<Tag:0x00007f8b19c11988>

Hello,

On HT 9, the visual index of the column seems not considering the hidden columns. I am not sure if this is by design or if this is already a known issue.

Here is the fiddle. By clicking the button ‘select column’, it should always select the forth (visual index = 3) column. However, after hide the column ‘C’, it still select column ‘D’ which I would expect it should select Column ‘E’
https://jsfiddle.net/guobacai/46gcnaLz/22/

Step:

  1. Click the button ‘select column’, it should select column ‘D’
  2. Right click the column ‘C’ and click the ‘Hide Column’. Make sure the column ‘C’ is hidden.
  3. Click the button ‘select column’ again and the column ‘E’ is supposed to be selected.
    Actual result: The column ‘D’ is still selected.

Let me know if you need more information.

Thanks,

Hi @lijigang.us
It’s expected behaviour. And that always worked that way.

Since v8, we have 3 presentation layers.

  1. Physical - it’s a 1:1 reflection of the dataset you attached to Handsontable. We do not put any transformation here (hiding, filtering, sorting, moving).
  2. Visual - Responses to transform dataset into 2d array with attached data transformations (filtering, sorting, moving)
  3. Renderable - Responses to apply visual attributes, like hiding. It does not interfere with the data addressing for getting cells’ values from Handsontable. We use that layer to reduce over-rendering DOM elements and for other performance reasons.

Thanks to that, you can call getDataAtCell() or setDataAtCell() for hidden parts, and we were able to provide copy-paste functionality accurate to the market standards.

@piotr.laszczkowski

Thanks so much for the explanation.