@uxf/data-grid 11.103.0 → 11.104.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.
@@ -98,7 +98,11 @@ function DataGridHiddenColumnsSortable(props) {
98
98
  // update all columns visibility in a single action to avoid multiple action calls
99
99
  const newUserConfigColumns = {}; // TODO finalize typing after merging https://gitlab.uxf.cz/uxf/npm-packages/fe-monorepo/-/merge_requests/720
100
100
  allColumns.forEach((column) => {
101
- newUserConfigColumns[column.name] = { isHidden: !value };
101
+ var _a;
102
+ newUserConfigColumns[column.name] = {
103
+ ...(_a = props.state.userConfig.columns) === null || _a === void 0 ? void 0 : _a[column.name],
104
+ isHidden: !value,
105
+ };
102
106
  });
103
107
  props.actions.updateUserConfig({ columns: newUserConfigColumns });
104
108
  };
@@ -19,7 +19,18 @@ function DataGridHiddenColumns(props) {
19
19
  const visibleColumns = columns.filter((c) => { var _a, _b, _c, _d; return !((_c = (_b = (_a = props.state.userConfig.columns) === null || _a === void 0 ? void 0 : _a[c.name]) === null || _b === void 0 ? void 0 : _b.isHidden) !== null && _c !== void 0 ? _c : (_d = c.config) === null || _d === void 0 ? void 0 : _d.isHidden); });
20
20
  const hiddenColumns = columns.filter((c) => { var _a, _b, _c, _d; return (_c = (_b = (_a = props.state.userConfig.columns) === null || _a === void 0 ? void 0 : _a[c.name]) === null || _b === void 0 ? void 0 : _b.isHidden) !== null && _c !== void 0 ? _c : (_d = c.config) === null || _d === void 0 ? void 0 : _d.isHidden; });
21
21
  const onToggleChange = (columnName) => (value) => props.actions[value ? "showColumn" : "hideColumn"](columnName);
22
- const onChangeAll = (value) => () => columns.forEach((column) => props.actions[value ? "showColumn" : "hideColumn"](column.name));
22
+ const onChangeAll = (value) => () => {
23
+ // update all columns visibility in a single action to avoid multiple action calls
24
+ const newUserConfigColumns = {}; // TODO finalize typing after merging https://gitlab.uxf.cz/uxf/npm-packages/fe-monorepo/-/merge_requests/720
25
+ props.schema.columns.forEach((column) => {
26
+ var _a;
27
+ newUserConfigColumns[column.name] = {
28
+ ...(_a = props.state.userConfig.columns) === null || _a === void 0 ? void 0 : _a[column.name],
29
+ isHidden: !value,
30
+ };
31
+ });
32
+ props.actions.updateUserConfig({ columns: newUserConfigColumns });
33
+ };
23
34
  return (react_1.default.createElement("div", { className: "uxf-data-grid__toolbar-control-columns" },
24
35
  react_1.default.createElement("div", { className: "uxf-data-grid__hidden-columns-title" },
25
36
  react_1.default.createElement("div", null, t("uxf-data-grid-hidden-columns:visible-columns")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/data-grid",
3
- "version": "11.103.0",
3
+ "version": "11.104.1",
4
4
  "description": "UXF DataGrid",
5
5
  "homepage": "https://gitlab.com/uxf-npm/data-grid#readme",
6
6
  "main": "index.js",
@@ -37,8 +37,8 @@
37
37
  "@dnd-kit/core": "6.3.1",
38
38
  "@dnd-kit/sortable": "10.0.0",
39
39
  "@uxf/core": "11.100.0",
40
- "@uxf/core-react": "11.100.0",
41
- "@uxf/ui": "11.102.0",
40
+ "@uxf/core-react": "11.104.0",
41
+ "@uxf/ui": "11.104.0",
42
42
  "dayjs": "1.11.19",
43
43
  "deepmerge": "4.3.1",
44
44
  "fast-glob": "3.3.3",