From aa40880ed7186e6f999b05203b6455db2285c6bf Mon Sep 17 00:00:00 2001 From: Bilal Shafi Date: Wed, 16 Oct 2024 19:36:36 +0500 Subject: [PATCH] [DataGridPro] Fix indeterminate checkbox state for server-side data (#14956) --- packages/x-data-grid/src/hooks/features/rowSelection/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ce2aa20c4e3b0..6084acb11686b 100644 --- a/packages/x-data-grid/src/hooks/features/rowSelection/utils.ts +++ b/packages/x-data-grid/src/hooks/features/rowSelection/utils.ts @@ -87,8 +87,8 @@ export function getCheckboxPropsSelector(groupId: GridRowId, autoSelectParents: } return { isIndeterminate: - (selectedDescendantsCount > 0 && selectedDescendantsCount < selectableDescendantsCount) || - (selectedDescendantsCount === selectableDescendantsCount && + selectedDescendantsCount > 0 && + (selectedDescendantsCount < selectableDescendantsCount || rowSelectionLookup[groupId] === undefined), isChecked: autoSelectParents ? selectedDescendantsCount > 0