sccoreui 6.5.33 → 6.5.34

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/dist/App.js CHANGED
@@ -4,6 +4,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  require("./App.scss");
5
5
  // import Home from "./pages/home";
6
6
  const App = () => {
7
- return ((0, jsx_runtime_1.jsx)("div", { className: "m-6" }));
7
+ return (0, jsx_runtime_1.jsx)("div", { className: "m-6" });
8
8
  };
9
9
  exports.default = App;
@@ -407,7 +407,11 @@ function ParentForGrid(props) {
407
407
  const gridOptions = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ columnDefs: (_d = gridData === null || gridData === void 0 ? void 0 : gridData.columnData) === null || _d === void 0 ? void 0 : _d.map((column) => {
408
408
  var _a, _b;
409
409
  if (column === null || column === void 0 ? void 0 : column.enableChildCheckbox) {
410
- return Object.assign(Object.assign(Object.assign({}, column), ((column === null || column === void 0 ? void 0 : column.enableHeaderCheckbox) ? { headerComponent: (params) => headerCheckBoxRenderer(params === null || params === void 0 ? void 0 : params.displayName, (column === null || column === void 0 ? void 0 : column.headerComponent) && "") } : {})), { cellRenderer: (params) => (0, utilComponents_1.dataCellRenderer)(params, column, props), cellRendererParams: {
410
+ return Object.assign(Object.assign(Object.assign({}, column), ((column === null || column === void 0 ? void 0 : column.enableHeaderCheckbox)
411
+ ? {
412
+ headerComponent: (params) => headerCheckBoxRenderer(params === null || params === void 0 ? void 0 : params.displayName, (column === null || column === void 0 ? void 0 : column.headerComponent) && ""),
413
+ }
414
+ : {})), { cellRenderer: (params) => (0, utilComponents_1.dataCellRenderer)(params, column, props), cellRendererParams: {
411
415
  initialRenderer: column === null || column === void 0 ? void 0 : column.body,
412
416
  cellCheckBoxRenderer: cellCheckBoxRenderer,
413
417
  }, headerName: (_a = column === null || column === void 0 ? void 0 : column.headerName) === null || _a === void 0 ? void 0 : _a.toUpperCase() });
@@ -528,6 +532,11 @@ function ParentForGrid(props) {
528
532
  return colDef;
529
533
  });
530
534
  const reOrderedColumns = updatedColumnDefs.sort((a, b) => a.seq - b.seq);
535
+ // Keep React state in sync with the imperative grid update. Without this,
536
+ // gridData.columnData stays stale (old hide/seq) and the next re-render
537
+ // rebuilds gridOptions.columnDefs from it, reverting the change a few
538
+ // seconds later — the column only "sticks" after a full page reload.
539
+ setGridData((prev) => (Object.assign(Object.assign({}, prev), { columnData: columnFromProps })));
531
540
  (_c = gridRef.current.api) === null || _c === void 0 ? void 0 : _c.setGridOption("columnDefs", reOrderedColumns);
532
541
  }
533
542
  }, [props === null || props === void 0 ? void 0 : props.columnData]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.5.33",
3
+ "version": "6.5.34",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",