|
|
@@ -143,7 +143,15 @@ class ManualColumnResize extends BasePlugin {
|
|
|
this.currentTH = TH;
|
|
|
// getCoords returns CellCoords
|
|
|
// const col = this.hot.view.wt.wtTable.getCoords(TH).col;
|
|
|
- const col = this.hot.getColHeader().indexOf(TH.innerText);
|
|
|
+ // const col = this.hot.getColHeader().indexOf(TH.innerText);
|
|
|
+ let col = 0;
|
|
|
+ for (let i = 0; i < TH.parentNode.childNodes.length; i += 1) {
|
|
|
+ if (TH.parentNode.childNodes[i] === TH) col = i;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!TH.parentNode.childNodes[0].innerText.replace(/(\s| )/gi, '')) {
|
|
|
+ col -= 1;
|
|
|
+ }
|
|
|
|
|
|
const headerHeight = outerHeight(this.currentTH);
|
|
|
|