igort
(Igort)
March 3, 2020, 5:28pm
1
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).
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?
igort
(Igort)
March 4, 2020, 2:18pm
3
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 -
opened 03:19PM - 04 Mar 20 UTC
closed 07:38AM - 06 Aug 20 UTC
bug
Status: Released
Core: Update settings
Resizing
### Description
When we use `colWidths` within `updateSettings` don't adjust th… e column’s width to the contents.
In 7.4.2 and previous, after double click on the column resizes handle there is not enough space to contents.
But in version 8.0.0-beta1 is even worse - nothing change.
### Steps to reproduce
**7.4.2**
1. Open https://jsfiddle.net/nscm6rfb/
2. Double click in the first or second column resize

**8.0.0-beta1**
1. Open https://jsfiddle.net/home7kjv/
2. Double click in the first or second column resize

As soon as we fixed it we will let you know.
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.