@visactor/vtable 1.11.3 → 1.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/PivotTable.js CHANGED
@@ -520,8 +520,19 @@ class PivotTable extends BaseTable_1.BaseTable {
520
520
  for (let i = 0; i < (null == columnWidthConfig ? void 0 : columnWidthConfig.length); i++) {
521
521
  const item = columnWidthConfig[i], dimensions = item.dimensions, width = item.width, cell = this.getCellAddressByHeaderPaths(dimensions);
522
522
  if (cell.col >= this.rowHeaderLevelCount) {
523
- this.getCellHeaderPaths(cell.col, this.columnHeaderLevelCount - 1).colHeaderPaths.length === dimensions.length && cell && !this.internalProps._widthResizedColMap.has(cell.col) && (this._setColWidth(cell.col, width),
524
- this.internalProps._widthResizedColMap.add(cell.col));
523
+ const cellPath = this.getCellHeaderPaths(cell.col, this.columnHeaderLevelCount);
524
+ if (cellPath.colHeaderPaths.length === dimensions.length) {
525
+ let match = !0;
526
+ for (let i = 0; i < dimensions.length; i++) {
527
+ const dimension = dimensions[i];
528
+ if (cellPath.colHeaderPaths.findIndex(((colPath, index) => colPath.indicatorKey === dimension.indicatorKey || colPath.dimensionKey === dimension.dimensionKey && colPath.value === dimension.value)) < 0) {
529
+ match = !1;
530
+ break;
531
+ }
532
+ }
533
+ match && !this.internalProps._widthResizedColMap.has(cell.col) && (this._setColWidth(cell.col, width),
534
+ this.internalProps._widthResizedColMap.add(cell.col));
535
+ }
525
536
  }
526
537
  }
527
538
  }