updateSettings resets a column's visibility state

Tags: #<Tag:0x00007f8b23ebace8>

I am using the “hiddenColumns” plugin to hide or show a column according to a button click as such:

button.onclick = function() {
	const plugin = hot.getPlugin('hiddenColumns');
	if (plugin.isHidden(0, true))
		plugin.showColumn(0);
	else
		plugin.hideColumn(0);
	hot.render();
}

Also, I have hiddenColumns: { columns: [0] } in the options object to start the column hidden.
The problem is that when I use hot.updateSettings({}); anywhere, even with unrelated settings, the table gets rendered again, resetting the column’s state to hidden when it should be shown. It also works the other way around: if I set it initially to shown, and hide it using my button that calls the plugin and then call updateSettings(), it will show again.
What can I do?

Hi @aabounegm

What version are you using? We had a similar issue reported here https://github.com/handsontable/handsontable/issues/4251 but it seems to be fixed in version 1.15.0

I am indeed using Handsontable-pro version 1.15.0

Can you put the code in a demo? I will test it and check what is causing the issue

Here you go:
http://jsfiddle.net/sj0q574z/3/

Thank you. I have replicated the issue and opened https://github.com/handsontable/handsontable/issues/4251

Officially fixed yesterday under 8.0.0-beta1 https://github.com/handsontable/handsontable/issues/4121

Below are the resources

</style><script src="https://cdn.jsdelivr.net/gh/handsontable/handsontable@release/8.0.0-beta.1/dist/handsontable.full.js"></script><link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/gh/handsontable/handsontable@release/8.0.0-beta.1/dist/handsontable.full.css">

And this is how you can download the beta from NPM

npm i handsontable@beta

I appreciate any feedback. Thank you.