Enabling manualColumnSizes plugin displays Hidden Columns

Tags: #<Tag:0x00007f135fb418c8>

Continuing the discussion from Enabling manualColumnMove and hiddenColumns displays Empty Values in Column (PRO):

Hi @aleksandra_budnik,

I just found the initial issue reported on the ticket was already solved with the version 1.3.2, but now I am facing same issue when I enable ‘manualColumnResize’ plugin.

Again, our main goal is to enable “hide/show”, “manualColumnMove” and “manualColumnSize” for our users and be able to save the state of the table in the browser without any issue, as you are not supporting persistence for “hide/show” we just handle that and then use the plugin to hide/show after creating the table, as described in my examples:

I am trying two different approaches to define column sizes, with similar catastrophic results:

A) Having 6 columns and defining ‘manualColumnResize’ as array with the default sizes for my columns, persistentState as true and colWidths undefined.

hot1 = new Handsontable(table,{
  data: Handsontable.helper.createSpreadsheetData(100, 6),
  colHeaders: ['A', 'B', 'C', 'D', 'E', 'F'],
  manualColumnMove: [0,1,2,4,3],
  manualColumnResize: [50, 50],
  hiddenColumns: true,
  stretchH: 'all',
  persistentState: true,
  rowHeaders: true,
  dropdownMenu: true,
  renderAllRows: true
});

And then hiding columns [0,5]:

hot1.getPlugin('hiddenColumns').hideColumns([0,5]);

Result: Column 5 (“F”) was hidden, but since column 0 (“A”) has a size defined in “manualColumnResize”, the column is displayed as empty. Here is the JSFiddle http://jsfiddle.net/gvazq82/s3kdc04c/

B) Having the same 6 columns but instead of define as Array manualColumnResize, I define ‘colWidths’.

hot1 = new Handsontable(table,{
   data: Handsontable.helper.createSpreadsheetData(100, 6),
   colHeaders: ['A', 'B', 'C', 'D', 'E', 'F'],
   manualColumnMove: [0,1,2,4,3],
   manualColumnResize: true, //[50, 50, null, 50, null, null],
   colWidths: [10, 50, null, 50, null, null],
   hiddenColumns: true,
   stretchH: 'all',
   persistentState: true,
   rowHeaders: true,
   dropdownMenu: true,
   renderAllRows: true
});

And then hiding columns [0,5]:

hot1.getPlugin('hiddenColumns').hideColumns([0,5]);

Result: The initial display seems correct, but now I resize the column ‘C’ and refresh the page, for some reason the column ‘F’ that should be hidden, is displayed with empty content. Here is JSFiddle http://jsfiddle.net/gvazq82/rbrqe8dh/

Please let me know your comments and if there is any solution for this.

I appreciate your prompt response.

Thanks,

Gabriel.

Hi @gabriel_vazquez

I see that this issue is related to: Issues with callbacks when enable "persistentState"

Please give me some time to check it.

Hi @aleksandra_budnik

This is not related to the issue about persistentState, because even If I remove persistenState(cleaning local storage) the issues are still happening.

For the scenario A, the column A is still displayed as empty if it is provided a size in the attribute manualColumnResize,
I just updated my JSFiddle.

http://jsfiddle.net/gvazq82/s3kdc04c/

For the scenario B, removing the state, the table is displayed correctly at the beginning, but then if you start resizing the columns, specially the last column ‘D’, the hidden columns are displayed with empty data, I think this has to be related to stretchH property.

.

http://jsfiddle.net/gvazq82/rbrqe8dh/

Let me know your comments.

You’re right. Thanks for sharing!

I can see that when you want to hide some columns stretchH and manulaColumnResize won’t work together.

It looks complex as we have three options dependent of another.

Added to our internal issue board #48

Hi @aleksandra_budnik,

I see it was created as internal issue for this, Do you know when this is going to be fixed?

Thanks again for your prompt response.

Gabriel.

I’d be happy to say it will be fixed soon but unfortunately I do not know the date yet.

In the meanwhile please take a minute to check our Roadmap to be up-to-date with our recent tasks: https://trello.com/b/PztR4hpj/handsontable-roadmap-2016-you-can-vote-for-features

@aleksandra_budnik I upgrade to version PRO 1.5.0 but still having this issue, What is the status for this issue? I was not able to identify the issue in Trello.

Hi @gabriel_vazquez
That’s right, it’s not yet on our Trello.
We are currently gathering tickets to the new release but there are few things that we have to fix first. Please stay tuned to this topic for any updates.

The issue no longer occur. Please update to version 5.0.0+