@fundamental-ngx/platform 0.43.10 → 0.43.11

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.
@@ -2736,7 +2736,7 @@ class TableColumnResizeService {
2736
2736
  }
2737
2737
  /** Update columns width after resizing, prevent from having too small columns. */
2738
2738
  _processResize(diffX) {
2739
- var _a, _b;
2739
+ var _a, _b, _c, _d;
2740
2740
  const resizedElement = (_b = (_a = this._columnsCellMap.get(this._resizedColumn)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.nativeElement;
2741
2741
  const columnWidth = resizedElement === null || resizedElement === void 0 ? void 0 : resizedElement.getBoundingClientRect().width;
2742
2742
  if (!columnWidth || !resizedElement) {
@@ -2752,14 +2752,23 @@ class TableColumnResizeService {
2752
2752
  }
2753
2753
  }
2754
2754
  }
2755
- if (diffX > 0 && this._tableRef._freezableColumns.has(this._resizedColumn)) {
2756
- const freezeToNextColumnName = this._visibleColumnNames[this._tableRef._freezableColumns.size];
2757
- const actualWidth = this.getPrevColumnsWidth(freezeToNextColumnName);
2755
+ /**
2756
+ * In case "_resizedColumn" is freezable, make sure the overall width of freezable columns does not exceed the width of the table.
2757
+ * If it does, columns will be made unfrozen.
2758
+ */
2759
+ if (diffX > 0 &&
2760
+ (this._tableRef._freezableColumns.has(this._resizedColumn) ||
2761
+ ((_c = this._tableRef._freezableEndColumns) === null || _c === void 0 ? void 0 : _c.has(this._resizedColumn)))) {
2762
+ let actualWidth = this.getPrevColumnsWidth(this._resizedColumn) + columnWidth;
2763
+ if ((_d = this._tableRef._freezableEndColumns) === null || _d === void 0 ? void 0 : _d.has(this._resizedColumn)) {
2764
+ actualWidth = this.getNextColumnsWidth(this._resizedColumn) + columnWidth;
2765
+ }
2758
2766
  const newWidth = actualWidth + diffX;
2759
2767
  const maxWidth = this._tableRef.getMaxAllowedFreezableColumnsWidth();
2760
- // in case "_resizedColumn" is freezable, make sure the overall width of freezable columns does not exceed the width of the table
2761
2768
  if (newWidth >= maxWidth) {
2762
- diffX = maxWidth - actualWidth;
2769
+ this._tableRef._freezableColumns.forEach((column) => {
2770
+ this._tableRef.unfreeze(column.toString());
2771
+ });
2763
2772
  }
2764
2773
  }
2765
2774
  const updatedWidth = columnWidth + diffX;