diff --git a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx index 1319523e79486..0e1674bb12555 100644 --- a/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx +++ b/packages/x-data-grid/src/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.tsx @@ -108,14 +108,18 @@ function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingl onChange={handleChange} getOptionLabel={getOptionLabel} renderTags={(value, getTagProps) => - value.map((option, index) => ( - - )) + value.map((option, index) => { + const { key, ...tagProps } = getTagProps({ index }); + return ( + + ); + }) } renderInput={(params) => ( >; textField?: SlotComponentProps< - React.ElementType, + typeof TextField, {}, - { position?: 'start' | 'end' } & Record + { position?: RangePosition } & Record >; }; } diff --git a/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts b/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts index 32cb59af51f45..c7ea79e908dc1 100644 --- a/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts +++ b/packages/x-date-pickers/src/PickersLayout/PickersLayout.types.ts @@ -1,14 +1,17 @@ import * as React from 'react'; import { SxProps, Theme } from '@mui/material/styles'; import { SlotComponentProps } from '@mui/base/utils'; -import { PickersActionBarProps } from '../PickersActionBar'; +import { PickersActionBar, PickersActionBarProps } from '../PickersActionBar'; import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar'; import { BaseTabsProps, ExportedBaseTabsProps } from '../internals/models/props/tabs'; import { UsePickerLayoutPropsResponseLayoutProps } from '../internals/hooks/usePicker/usePickerLayoutProps'; import { PickersLayoutClasses } from './pickersLayoutClasses'; import { DateOrTimeViewWithMeridiem, WrapperVariant } from '../internals/models/common'; import { PickersShortcutsProps } from '../PickersShortcuts'; -import { ExportedPickersShortcutProps } from '../PickersShortcuts/PickersShortcuts'; +import { + ExportedPickersShortcutProps, + PickersShortcuts, +} from '../PickersShortcuts/PickersShortcuts'; import { PickerValidDate } from '../models'; export interface ExportedPickersLayoutSlots< @@ -56,20 +59,14 @@ export interface ExportedPickersLayoutSlotProps< * Props passed down to the action bar component. */ actionBar?: SlotComponentProps< - React.ComponentType< - Omit - >, + typeof PickersActionBar, {}, PickersLayoutActionBarOwnerState >; /** * Props passed down to the shortcuts component. */ - shortcuts?: SlotComponentProps< - React.ComponentType>, - {}, - PickersShortcutsOwnerState - >; + shortcuts?: SlotComponentProps>; /** * Props passed down to the layoutRoot component. */ diff --git a/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx b/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx index f49ced45e02cc..17b44028ca765 100644 --- a/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx +++ b/packages/x-date-pickers/src/internals/components/PickersToolbarButton.tsx @@ -38,30 +38,32 @@ const PickersToolbarButtonRoot = styled(Button, { textTransform: 'none', }); -export const PickersToolbarButton: React.FunctionComponent = - React.forwardRef(function PickersToolbarButton(inProps, ref) { - const props = useThemeProps({ props: inProps, name: 'MuiPickersToolbarButton' }); - const { align, className, selected, typographyClassName, value, variant, width, ...other } = - props; +export const PickersToolbarButton = React.forwardRef(function PickersToolbarButton( + inProps: PickersToolbarButtonProps, + ref: React.Ref, +) { + const props = useThemeProps({ props: inProps, name: 'MuiPickersToolbarButton' }); + const { align, className, selected, typographyClassName, value, variant, width, ...other } = + props; - const classes = useUtilityClasses(props); + const classes = useUtilityClasses(props); - return ( - - - - ); - }); + return ( + + + + ); +});