Skip to content

Commit

Permalink
[DataGrid] refactor: remove more material imports (#15063)
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk authored Oct 23, 2024
1 parent 8deef74 commit 10985e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import { ownerDocument, useEventCallback } from '@mui/material/utils';
import ownerDocument from '@mui/utils/ownerDocument';
import useEventCallback from '@mui/utils/useEventCallback';
import {
GridPipeProcessor,
GridStateInitializer,
Expand Down
5 changes: 2 additions & 3 deletions packages/x-data-grid/src/components/cell/GridActionsCell.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import MenuList from '@mui/material/MenuList';
import { useRtl } from '@mui/system/RtlProvider';
import { unstable_useId as useId } from '@mui/utils';
import { GridRenderCellParams } from '../../models/params/gridCellParams';
Expand Down Expand Up @@ -224,7 +223,7 @@ function GridActionsCell(props: GridActionsCellProps) {

{menuButtons.length > 0 && (
<GridMenu open={open} target={buttonRef.current} position={position} onClose={hideMenu}>
<MenuList
<rootProps.slots.baseMenuList
id={menuId}
className={gridClasses.menuList}
onKeyDown={handleListKeyDown}
Expand All @@ -235,7 +234,7 @@ function GridActionsCell(props: GridActionsCellProps) {
{menuButtons.map((button, index) =>
React.cloneElement(button, { key: index, closeMenu: hideMenu }),
)}
</MenuList>
</rootProps.slots.baseMenuList>
</GridMenu>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import useId from '@mui/utils/useId';
import { ButtonProps } from '@mui/material/Button';
import { TooltipProps } from '@mui/material/Tooltip';
import { unstable_useId as useId } from '@mui/material/utils';
import { useGridSelector } from '../../hooks/utils/useGridSelector';
import { gridPreferencePanelStateSelector } from '../../hooks/features/preferencesPanel/gridPreferencePanelSelector';
import { GridPreferencePanelsValue } from '../../hooks/features/preferencesPanel/gridPreferencePanelsValue';
Expand Down

0 comments on commit 10985e8

Please sign in to comment.