From d8a573859fea368c8579cc20d3d2be275f9cd107 Mon Sep 17 00:00:00 2001 From: Rajat Date: Tue, 5 Nov 2024 12:27:29 +0530 Subject: [PATCH] should open/close row when enter key pressed --- .../src/hooks/features/treeData/useGridTreeData.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/x-data-grid-pro/src/hooks/features/treeData/useGridTreeData.tsx b/packages/x-data-grid-pro/src/hooks/features/treeData/useGridTreeData.tsx index 8f09f695627d..b98528fb3693 100644 --- a/packages/x-data-grid-pro/src/hooks/features/treeData/useGridTreeData.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/treeData/useGridTreeData.tsx @@ -17,7 +17,7 @@ export const useGridTreeData = ( const cellParams = apiRef.current.getCellParams(params.id, params.field); if ( cellParams.colDef.field === GRID_TREE_DATA_GROUPING_FIELD && - event.key === ' ' && + (event.key === ' ' || event.key === 'Enter') && !event.shiftKey ) { if (params.rowNode.type !== 'group') {