From 3fa5b49b2576873d2c54593867168cd59155115b Mon Sep 17 00:00:00 2001 From: Bilal Shafi Date: Tue, 26 Nov 2024 19:05:10 +0500 Subject: [PATCH] [DataGrid] Remove `indeterminateCheckboxAction` prop (#15522) --- .../CheckboxSelectionIndeterminateGrid.js | 17 ------- .../CheckboxSelectionIndeterminateGrid.tsx | 17 ------- ...kboxSelectionIndeterminateGrid.tsx.preview | 1 - .../data-grid/row-selection/row-selection.md | 7 --- .../migration-data-grid-v7.md | 20 +------- .../x/api/data-grid/data-grid-premium.json | 4 -- docs/pages/x/api/data-grid/data-grid-pro.json | 4 -- docs/pages/x/api/data-grid/data-grid.json | 4 -- .../data-grid-premium/data-grid-premium.json | 3 -- .../data-grid-pro/data-grid-pro.json | 3 -- .../data-grid/data-grid/data-grid.json | 3 -- .../src/DataGridPremium/DataGridPremium.tsx | 8 --- .../rowSelection.DataGridPremium.test.tsx | 47 +++++------------- .../src/DataGridPro/DataGridPro.tsx | 8 --- .../tests/rowSelection.DataGridPro.test.tsx | 49 +++++-------------- .../x-data-grid/src/DataGrid/DataGrid.tsx | 8 --- .../GridCellCheckboxRenderer.tsx | 9 +--- .../columnSelection/GridHeaderCheckbox.tsx | 11 ++--- .../constants/dataGridPropsDefaultValues.ts | 2 - .../src/models/props/DataGridProps.ts | 8 --- .../src/tests/rowSelection.DataGrid.test.tsx | 24 +++------ 21 files changed, 37 insertions(+), 220 deletions(-) delete mode 100644 docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.js delete mode 100644 docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx delete mode 100644 docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx.preview diff --git a/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.js b/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.js deleted file mode 100644 index 88493e2bf3a7..000000000000 --- a/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.js +++ /dev/null @@ -1,17 +0,0 @@ -import * as React from 'react'; -import { DataGrid } from '@mui/x-data-grid'; -import { useDemoData } from '@mui/x-data-grid-generator'; - -export default function CheckboxSelectionIndeterminateGrid() { - const { data } = useDemoData({ - dataSet: 'Commodity', - rowLength: 10, - maxColumns: 5, - }); - - return ( -
- -
- ); -} diff --git a/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx b/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx deleted file mode 100644 index 88493e2bf3a7..000000000000 --- a/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import * as React from 'react'; -import { DataGrid } from '@mui/x-data-grid'; -import { useDemoData } from '@mui/x-data-grid-generator'; - -export default function CheckboxSelectionIndeterminateGrid() { - const { data } = useDemoData({ - dataSet: 'Commodity', - rowLength: 10, - maxColumns: 5, - }); - - return ( -
- -
- ); -} diff --git a/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx.preview b/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx.preview deleted file mode 100644 index 9091ca3b75cc..000000000000 --- a/docs/data/data-grid/row-selection/CheckboxSelectionIndeterminateGrid.tsx.preview +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/data/data-grid/row-selection/row-selection.md b/docs/data/data-grid/row-selection/row-selection.md index 84210a5a343d..3414ceb1695e 100644 --- a/docs/data/data-grid/row-selection/row-selection.md +++ b/docs/data/data-grid/row-selection/row-selection.md @@ -71,13 +71,6 @@ Always set the `checkboxSelection` prop to `true` even when providing a custom c Otherwise, the Data Grid might remove your column. ::: -### Customize indeterminate checkbox behavior - -The parent checkboxes (like "Select All" checkbox) when clicked in an indeterminate state will deselect the selected rows. -You can customize this behavior by using the [`indeterminateCheckboxAction` prop](/x/api/data-grid/data-grid/#data-grid-prop-indeterminateCheckboxAction). - -{{"demo": "CheckboxSelectionIndeterminateGrid.js", "bg": "inline"}} - ### Visible rows selection [](/x/introduction/licensing/#pro-plan 'Pro plan') By default, when you click the "Select All" checkbox, all rows in the Data Grid are selected. diff --git a/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md b/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md index eea548d0fbc0..db1f4b384786 100644 --- a/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md +++ b/docs/data/migration/migration-data-grid-v7/migration-data-grid-v7.md @@ -33,27 +33,11 @@ Since v8 is a major release, it contains some changes that affect the public API These changes were done for consistency, improve stability and make room for new features. Below are described the steps you need to make to migrate from v7 to v8. -:::info -The list is currently empty, but as we move forward with development during the alpha and beta phases, we'll feed this page with all changes in the API. -::: - -