Skip to content

Commit e754c67

Browse files
fix(datagrid-web): update selection properties to include 'keepSelection' in hide logic
1 parent 7d91f12 commit e754c67

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

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

160160
if (itemSelection === "None") {
161-
hidePropertiesIn(defaultProperties, values, ["itemSelectionMethod", "itemSelectionMode", "onSelectionChange"]);
161+
hidePropertiesIn(defaultProperties, values, [
162+
"itemSelectionMethod",
163+
"itemSelectionMode",
164+
"onSelectionChange",
165+
"keepSelection"
166+
]);
162167
}
163168

164169
if (itemSelectionMethod === "checkbox") {
@@ -170,11 +175,7 @@ function hideSelectionProperties(defaultProperties: Properties, values: Datagrid
170175
}
171176

172177
if (itemSelection !== "Multi") {
173-
hidePropertiesIn(defaultProperties, values, [
174-
"keepSelection",
175-
"selectionCountPosition",
176-
"clearSelectionButtonLabel"
177-
]);
178+
hidePropertiesIn(defaultProperties, values, ["selectionCountPosition", "clearSelectionButtonLabel"]);
178179
}
179180
}
180181

0 commit comments

Comments
 (0)