Double click on the column resize handle does not adjust size correctly

Tags: #<Tag:0x00007f8b2b03b458>

Expected: Double click on the column resize handle automatically adjusts size of the column.
Actual result: Double click on the column resize handle collapses column (width).

Demo (modified https://jsfiddle.net/api/post/library/pure/):

  var container = document.getElementById('example1');
  var hot = new Handsontable(container, {
    data: Handsontable.helper.createSpreadsheetData(200, 10),
    rowHeaders: true,
    colHeaders: true,
    width: '100%',
    height: 320,
    //colWidths: 100,
    rowHeights: [50, 40, 100],
    manualColumnResize: true,
    manualRowResize: true
  });

window.onload = () => {
	setTimeout(() => {
		console.log('onload()');
		hot.updateSettings({
			colWidths: [90, 200, 260, 120, 160, 160, 160],
		});
	});
}

NOTE: constructor of Handsontable does NOT set colWidths.
That causes abnormal behavior.

Hi @igort

Double click on the column resize handle collapses column (width).
This is the default behaviour of manualColumnResize plugin - https://handsontable.com/docs/7.4.2/demo-resizing.html?_ga=2.3901810.394384333.1583308445-1051546746.1507722840

What goal do you want to achieve?

This ‘default’ behaviour is inconsistent: one behaviour when colWidths is set in constructor, different behaviour if colWidths is set not in constructor.

My expectation is that double-click on resize handle will always work the same: adjust column’s width to the contents.

Yes, you right.

I reported this issue in our GitHub repository -

As soon as we fixed it we will let you know.

Thanks, appreciated!

Hi @igort

I have good news! We’ve just released 8.0.0-beta2 that fixes the mentioned issue. We won’t be closing this ticket now. It will be closed after we release the final 8.0.0 version of Handsontable.

Here’s a full list of changes https://github.com/handsontable/handsontable/releases/tag/8.0.0-beta.2
NPM https://www.npmjs.com/package/handsontable/v/8.0.0-beta.2

All feedback’s appreciated. Thank you for your input.

This issue was solved in v.8.0.0.