diff --git a/docs/data/data-grid/master-detail/ControlMasterDetail.js b/docs/data/data-grid/master-detail/ControlMasterDetail.js index e6bfb80f6646..056ce7dac09f 100644 --- a/docs/data/data-grid/master-detail/ControlMasterDetail.js +++ b/docs/data/data-grid/master-detail/ControlMasterDetail.js @@ -11,7 +11,7 @@ import Alert from '@mui/material/Alert'; export default function ControlMasterDetail() { const [detailPanelExpandedRowIds, setDetailPanelExpandedRowIds] = React.useState( - new Set(), + () => new Set(), ); const handleDetailPanelExpandedRowIdsChange = React.useCallback((newIds) => { diff --git a/docs/data/data-grid/master-detail/ControlMasterDetail.tsx b/docs/data/data-grid/master-detail/ControlMasterDetail.tsx index 798f1063ebba..967619c55552 100644 --- a/docs/data/data-grid/master-detail/ControlMasterDetail.tsx +++ b/docs/data/data-grid/master-detail/ControlMasterDetail.tsx @@ -17,7 +17,7 @@ import Alert from '@mui/material/Alert'; export default function ControlMasterDetail() { const [detailPanelExpandedRowIds, setDetailPanelExpandedRowIds] = React.useState( - new Set(), + () => new Set(), ); const handleDetailPanelExpandedRowIdsChange = React.useCallback<