diff --git a/docs/data/data-grid/row-grouping/row-grouping.md b/docs/data/data-grid/row-grouping/row-grouping.md
index e2b23b3f884a7..b70899fb38b47 100644
--- a/docs/data/data-grid/row-grouping/row-grouping.md
+++ b/docs/data/data-grid/row-grouping/row-grouping.md
@@ -321,13 +321,13 @@ type GridRowSelectionPropagation = {
When `rowSelectionPropagation.descendants` is set to `true`.
-- Selecting a parent would auto-select all its filtered descendants.
-- Deselecting a parent row would auto-deselect all its filtered descendants.
+- Selecting a parent selects all its filtered descendants automatically.
+- Deselecting a parent row deselects all its filtered descendants automatically.
When `rowSelectionPropagation.parents` is set to `true`.
-- Selecting all the filtered descendants of a parent would auto-select the parent.
-- Deselecting a descendant of a selected parent would auto-deselect the parent.
+- Selecting all the filtered descendants of a parent selects the parent automatically.
+- Deselecting a descendant of a selected parent deselects the parent automatically.
The example below demonstrates the usage of the `rowSelectionPropagation` prop.
diff --git a/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json b/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json
index 28635d8a0a7f6..78865102281cb 100644
--- a/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json
+++ b/docs/translations/api-docs/data-grid/data-grid-premium/data-grid-premium.json
@@ -619,7 +619,7 @@
"rowSelection": { "description": "If false
, the row selection mode is disabled." },
"rowSelectionModel": { "description": "Sets the row selection model of the Data Grid." },
"rowSelectionPropagation": {
- "description": "When rowSelectionPropagation.descendants
is set to true
. - Selecting a parent will auto-select all its filtered descendants. - Deselecting a parent will auto-deselect all its filtered descendants.
When rowSelectionPropagation.parents=true
- Selecting all descendants of a parent would auto-select it. - Deselecting a descendant of a selected parent would deselect the parent.
Works with tree data and row grouping on the client-side only."
+ "description": "When rowSelectionPropagation.descendants
is set to true
. - Selecting a parent selects all its filtered descendants automatically. - Deselecting a parent row deselects all its filtered descendants automatically.
When rowSelectionPropagation.parents
is set to true
- Selecting all the filtered descendants of a parent selects the parent automatically. - Deselecting a descendant of a selected parent deselects the parent automatically.
Works with tree data and row grouping on the client-side only."
},
"rowsLoadingMode": {
"description": "Loading rows can be processed on the server or client-side. Set it to 'client' if you would like enable infnite loading. Set it to 'server' if you would like to enable lazy loading. * @default "client""
diff --git a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json
index 6423bffb2f056..a0509f2e45491 100644
--- a/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json
+++ b/docs/translations/api-docs/data-grid/data-grid-pro/data-grid-pro.json
@@ -561,7 +561,7 @@
"rowSelection": { "description": "If false
, the row selection mode is disabled." },
"rowSelectionModel": { "description": "Sets the row selection model of the Data Grid." },
"rowSelectionPropagation": {
- "description": "When rowSelectionPropagation.descendants
is set to true
. - Selecting a parent will auto-select all its filtered descendants. - Deselecting a parent will auto-deselect all its filtered descendants.
When rowSelectionPropagation.parents=true
- Selecting all descendants of a parent would auto-select it. - Deselecting a descendant of a selected parent would deselect the parent.
Works with tree data and row grouping on the client-side only."
+ "description": "When rowSelectionPropagation.descendants
is set to true
. - Selecting a parent selects all its filtered descendants automatically. - Deselecting a parent row deselects all its filtered descendants automatically.
When rowSelectionPropagation.parents
is set to true
- Selecting all the filtered descendants of a parent selects the parent automatically. - Deselecting a descendant of a selected parent deselects the parent automatically.
Works with tree data and row grouping on the client-side only."
},
"rowsLoadingMode": {
"description": "Loading rows can be processed on the server or client-side. Set it to 'client' if you would like enable infnite loading. Set it to 'server' if you would like to enable lazy loading. * @default "client""
diff --git a/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx b/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx
index fe7edf11922e4..89e77912b74c9 100644
--- a/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx
+++ b/packages/x-data-grid-premium/src/DataGridPremium/DataGridPremium.tsx
@@ -994,12 +994,12 @@ DataGridPremiumRaw.propTypes = {
]),
/**
* When `rowSelectionPropagation.descendants` is set to `true`.
- * - Selecting a parent will auto-select all its filtered descendants.
- * - Deselecting a parent will auto-deselect all its filtered descendants.
+ * - Selecting a parent selects all its filtered descendants automatically.
+ * - Deselecting a parent row deselects all its filtered descendants automatically.
*
- * When `rowSelectionPropagation.parents=true`
- * - Selecting all descendants of a parent would auto-select it.
- * - Deselecting a descendant of a selected parent would deselect the parent.
+ * When `rowSelectionPropagation.parents` is set to `true`
+ * - Selecting all the filtered descendants of a parent selects the parent automatically.
+ * - Deselecting a descendant of a selected parent deselects the parent automatically.
*
* Works with tree data and row grouping on the client-side only.
* @default { parents: false, descendants: false }
diff --git a/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx b/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx
index 61d2eaf0dfd65..4590c79ccfdf5 100644
--- a/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx
+++ b/packages/x-data-grid-pro/src/DataGridPro/DataGridPro.tsx
@@ -900,12 +900,12 @@ DataGridProRaw.propTypes = {
]),
/**
* When `rowSelectionPropagation.descendants` is set to `true`.
- * - Selecting a parent will auto-select all its filtered descendants.
- * - Deselecting a parent will auto-deselect all its filtered descendants.
+ * - Selecting a parent selects all its filtered descendants automatically.
+ * - Deselecting a parent row deselects all its filtered descendants automatically.
*
- * When `rowSelectionPropagation.parents=true`
- * - Selecting all descendants of a parent would auto-select it.
- * - Deselecting a descendant of a selected parent would deselect the parent.
+ * When `rowSelectionPropagation.parents` is set to `true`
+ * - Selecting all the filtered descendants of a parent selects the parent automatically.
+ * - Deselecting a descendant of a selected parent deselects the parent automatically.
*
* Works with tree data and row grouping on the client-side only.
* @default { parents: false, descendants: false }
diff --git a/packages/x-data-grid/src/hooks/features/rowSelection/utils.ts b/packages/x-data-grid/src/hooks/features/rowSelection/utils.ts
index ba1ff85f77bed..ce2aa20c4e3b0 100644
--- a/packages/x-data-grid/src/hooks/features/rowSelection/utils.ts
+++ b/packages/x-data-grid/src/hooks/features/rowSelection/utils.ts
@@ -69,8 +69,8 @@ export function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents:
};
}
- let selectableDescendentsCount = 0;
- let selectedDescendentsCount = 0;
+ let selectableDescendantsCount = 0;
+ let selectedDescendantsCount = 0;
const startIndex = sortedRowIds.findIndex((id) => id === groupId) + 1;
for (
let index = startIndex;
@@ -79,19 +79,19 @@ export function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents:
) {
const id = sortedRowIds[index];
if (filteredRowsLookup[id] !== false) {
- selectableDescendentsCount += 1;
+ selectableDescendantsCount += 1;
if (rowSelectionLookup[id] !== undefined) {
- selectedDescendentsCount += 1;
+ selectedDescendantsCount += 1;
}
}
}
return {
isIndeterminate:
- (selectedDescendentsCount > 0 && selectedDescendentsCount < selectableDescendentsCount) ||
- (selectedDescendentsCount === selectableDescendentsCount &&
+ (selectedDescendantsCount > 0 && selectedDescendantsCount < selectableDescendantsCount) ||
+ (selectedDescendantsCount === selectableDescendantsCount &&
rowSelectionLookup[groupId] === undefined),
isChecked: autoSelectParents
- ? selectedDescendentsCount > 0
+ ? selectedDescendantsCount > 0
: rowSelectionLookup[groupId] === groupId,
};
},
diff --git a/packages/x-data-grid/src/models/props/DataGridProps.ts b/packages/x-data-grid/src/models/props/DataGridProps.ts
index fb15191033adb..866b882977f64 100644
--- a/packages/x-data-grid/src/models/props/DataGridProps.ts
+++ b/packages/x-data-grid/src/models/props/DataGridProps.ts
@@ -842,12 +842,12 @@ export interface DataGridProSharedPropsWithDefaultValue {
headerFilters: boolean;
/**
* When `rowSelectionPropagation.descendants` is set to `true`.
- * - Selecting a parent will auto-select all its filtered descendants.
- * - Deselecting a parent will auto-deselect all its filtered descendants.
+ * - Selecting a parent selects all its filtered descendants automatically.
+ * - Deselecting a parent row deselects all its filtered descendants automatically.
*
- * When `rowSelectionPropagation.parents=true`
- * - Selecting all descendants of a parent would auto-select it.
- * - Deselecting a descendant of a selected parent would deselect the parent.
+ * When `rowSelectionPropagation.parents` is set to `true`
+ * - Selecting all the filtered descendants of a parent selects the parent automatically.
+ * - Deselecting a descendant of a selected parent deselects the parent automatically.
*
* Works with tree data and row grouping on the client-side only.
* @default { parents: false, descendants: false }