Skip to content

Commit b385268

Browse files
[WC-3147]: Datagrid2 keep single row selection (#1961)
2 parents 8b95b46 + 8a3bfce commit b385268

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/pluggableWidgets/datagrid-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1616

1717
- We added configurable selection count visibility and clear selection button label template for improved row selection management.
1818

19+
### Fixed
20+
21+
- The property panel now shows keep selection property when datagrid is set to single selection.
22+
1923
- We fixed an issue where missing consistency checks for the captions were causing runtime errors instead of in Studio Pro
2024

2125
- We added a '"Select all" across pages' setting that, when enabled, allows users to select all rows across all pages.

packages/pluggableWidgets/datagrid-web/src/Datagrid.editorConfig.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,12 @@ function hideSelectionProperties(defaultProperties: Properties, values: Datagrid
130130
const { itemSelection, itemSelectionMethod } = values;
131131

132132
if (itemSelection === "None") {
133-
hidePropertiesIn(defaultProperties, values, ["itemSelectionMethod", "itemSelectionMode", "onSelectionChange"]);
133+
hidePropertiesIn(defaultProperties, values, [
134+
"itemSelectionMethod",
135+
"itemSelectionMode",
136+
"onSelectionChange",
137+
"keepSelection"
138+
]);
134139
}
135140

136141
if (itemSelectionMethod === "checkbox") {
@@ -143,7 +148,6 @@ function hideSelectionProperties(defaultProperties: Properties, values: Datagrid
143148

144149
if (itemSelection !== "Multi") {
145150
hidePropertiesIn(defaultProperties, values, [
146-
"keepSelection",
147151
"selectionCounterPosition",
148152
"clearSelectionButtonLabel",
149153
"enableSelectAll"

0 commit comments

Comments
 (0)