@uxf/data-grid 11.58.1 → 11.59.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/data-grid",
3
- "version": "11.58.1",
3
+ "version": "11.59.1",
4
4
  "description": "UXF DataGrid",
5
5
  "homepage": "https://gitlab.com/uxf-npm/data-grid#readme",
6
6
  "main": "index.js",
@@ -4,11 +4,17 @@ exports.getGridTemplateColumns = getGridTemplateColumns;
4
4
  const build_array_1 = require("@uxf/core/utils/build-array");
5
5
  const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
6
6
  const rem_1 = require("@uxf/styles/units/rem");
7
+ // if minWidth nor width is set for the column, take this
8
+ const COLUMN_DEFAULT_MIN_WIDTH = 80;
7
9
  function getGridTemplateColumns(config) {
8
10
  var _a, _b;
9
11
  return (0, build_array_1.buildArray)()
10
12
  .when((0, is_not_nil_1.isNotNil)(config.selectRowColumnWidth), (0, rem_1.rem)((_a = config.selectRowColumnWidth) !== null && _a !== void 0 ? _a : 0))
11
- .add(config.columns.map((col) => (col.minWidth ? `minmax(${col.minWidth},${col.width})` : col.width)).join(" "))
13
+ .add(config.columns
14
+ .map((col) => col.minWidth
15
+ ? `minmax(${col.minWidth},${col.width})`
16
+ : `minmax(${COLUMN_DEFAULT_MIN_WIDTH},${col.width})`)
17
+ .join(" "))
12
18
  .when((0, is_not_nil_1.isNotNil)(config.actionColumnWidth), `minmax(${(0, rem_1.rem)((_b = config.actionColumnWidth) !== null && _b !== void 0 ? _b : 0)}, auto)`)
13
19
  .join(" ");
14
20
  }