Skip to content

Commit

Permalink
fix(datagrid-web): update columns on change
Browse files Browse the repository at this point in the history
  • Loading branch information
iobuhov committed Nov 13, 2023
1 parent 0ff0a2b commit e5dac13
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/modules/data-widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/data-widgets",
"moduleName": "Data Widgets",
"version": "2.10.1",
"version": "2.10.2",
"license": "Apache-2.0",
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
"private": true,
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/datagrid-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- Fixed a regression that was introduced in 2.10.0, where the column was missing a caption if the caption used parameters.

## [2.10.1] - 2023-11-02

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/datagrid-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/datagrid-web",
"widgetName": "Datagrid",
"version": "2.10.1",
"version": "2.10.2",
"description": "",
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,7 @@ function columnsStateReducer(state: ColumnsState, action: Action): ColumnsState
return reduceOnPropChange(state, "columnsHidden", action.payload.hidden, computeVisible);
}
case "SetColumns": {
return reduceOnPropChange(
state,
"columns",
action.payload.columns,
(newState, prevColumns, nextColumns) => {
if (prevColumns.length !== nextColumns.length) {
return initColumnsState(nextColumns);
}
return newState;
}
);
return reduceOnPropChange(state, "columns", action.payload.columns, computeVisible);
}
default:
throw new Error("Columns state reducer: unknown action type");
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/datagrid-web/src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="Datagrid" version="2.10.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="Datagrid" version="2.10.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="Datagrid.xml" />
</widgetFiles>
Expand Down

0 comments on commit e5dac13

Please sign in to comment.