diff --git a/packages/x-data-grid/src/components/cell/GridActionsCell.tsx b/packages/x-data-grid/src/components/cell/GridActionsCell.tsx index 1f3d2cdca42db..670214537171a 100644 --- a/packages/x-data-grid/src/components/cell/GridActionsCell.tsx +++ b/packages/x-data-grid/src/components/cell/GridActionsCell.tsx @@ -235,7 +235,6 @@ function GridActionsCell(props: GridActionsCellProps) { className={gridClasses.menuList} onKeyDown={handleListKeyDown} aria-labelledby={buttonId} - variant="menu" autoFocusItem > {menuButtons.map((button, index) => diff --git a/packages/x-data-grid/src/material/index.tsx b/packages/x-data-grid/src/material/index.tsx index 2183e8f16ff94..40465440c74d5 100644 --- a/packages/x-data-grid/src/material/index.tsx +++ b/packages/x-data-grid/src/material/index.tsx @@ -97,7 +97,7 @@ const baseSlots: GridBaseSlots = { baseCircularProgress: MUICircularProgress, baseDivider: MUIDivider, baseLinearProgress: MUILinearProgress, - baseMenuList: MUIMenuList, + baseMenuList: BaseMenuList, baseMenuItem: BaseMenuItem, baseTextField: BaseTextField, baseFormControl: MUIFormControl, @@ -120,6 +120,10 @@ const materialSlots: GridBaseSlots & GridIconSlotsComponent = { export default materialSlots; +function BaseMenuList(props: GridSlotProps['baseMenuList']) { + return ; +} + function BaseMenuItem(props: GridSlotProps['baseMenuItem']) { const { inert, iconStart, iconEnd, children, ...other } = props; if (inert) { diff --git a/packages/x-data-grid/src/models/gridBaseSlots.ts b/packages/x-data-grid/src/models/gridBaseSlots.ts index 694f6e545a2e2..a6965f534034f 100644 --- a/packages/x-data-grid/src/models/gridBaseSlots.ts +++ b/packages/x-data-grid/src/models/gridBaseSlots.ts @@ -35,6 +35,16 @@ export type IconButtonProps = Omit & { export type DividerProps = {}; +export type MenuListProps = { + ref?: Ref; + id?: string; + className?: string; + children?: React.ReactNode; + autoFocus?: boolean; + autoFocusItem?: boolean; + onKeyDown?: React.KeyboardEventHandler; +}; + export type MenuItemProps = { autoFocus?: boolean; children?: React.ReactNode; diff --git a/packages/x-data-grid/src/models/gridSlotsComponentsProps.ts b/packages/x-data-grid/src/models/gridSlotsComponentsProps.ts index cda12ab2fd835..80237ecd19fa5 100644 --- a/packages/x-data-grid/src/models/gridSlotsComponentsProps.ts +++ b/packages/x-data-grid/src/models/gridSlotsComponentsProps.ts @@ -4,7 +4,6 @@ import type { ButtonProps as MUIButtonProps } from '@mui/material/Button'; import type { CheckboxProps } from '@mui/material/Checkbox'; import type { CircularProgressProps as MUICircularProgressProps } from '@mui/material/CircularProgress'; import type { LinearProgressProps as MUILinearProgressProps } from '@mui/material/LinearProgress'; -import type { MenuListProps } from '@mui/material/MenuList'; import type { MenuItemProps as MUIMenuItemProps } from '@mui/material/MenuItem'; import type { FormControlProps } from '@mui/material/FormControl'; import type { SelectProps } from '@mui/material/Select'; @@ -41,6 +40,7 @@ import type { DividerProps, IconButtonProps, LinearProgressProps, + MenuListProps, MenuItemProps, SkeletonProps, TooltipProps,