ngx-smz-ui 3.6.8 → 3.6.9
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.
|
@@ -8089,18 +8089,17 @@
|
|
|
8089
8089
|
context.columns.forEach(function (col) {
|
|
8090
8090
|
var _a, _b, _c;
|
|
8091
8091
|
var columnItems = samples.map(function (x) { return x[col.field]; }).filter(function (x) { return x != null; });
|
|
8092
|
-
var
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
col.width = estimativeWidth;
|
|
8092
|
+
var width = col.width;
|
|
8093
|
+
if (col.width == 'auto') {
|
|
8094
|
+
width = _this.estimate(columnItems, col.field, context.state.caption.columnVisibility.showDropdownSelector, context.state.caption.columnVisibility.showColumnHideButton, col.isOrderable, ((_a = col.filter) === null || _a === void 0 ? void 0 : _a.type) !== exports.SmzFilterType.NONE);
|
|
8095
|
+
}
|
|
8097
8096
|
var visibleColumnsIndex = (_b = context.visibleColumns) === null || _b === void 0 ? void 0 : _b.findIndex(function (x) { return x.field === col.field; });
|
|
8098
8097
|
if (visibleColumnsIndex >= 0) {
|
|
8099
|
-
context.visibleColumns[visibleColumnsIndex].width =
|
|
8098
|
+
context.visibleColumns[visibleColumnsIndex].width = width;
|
|
8100
8099
|
}
|
|
8101
8100
|
var frozenColumnsIndex = (_c = context.frozenColumns) === null || _c === void 0 ? void 0 : _c.findIndex(function (x) { return x.field === col.field; });
|
|
8102
8101
|
if (frozenColumnsIndex >= 0) {
|
|
8103
|
-
context.frozenColumns[frozenColumnsIndex].width =
|
|
8102
|
+
context.frozenColumns[frozenColumnsIndex].width = width;
|
|
8104
8103
|
}
|
|
8105
8104
|
});
|
|
8106
8105
|
// console.log('estimated', context.columns.map(x => `${x.field} => ${x.width}`));
|