Skip to content

[Select] - not able to reassign transition component using theme #47452

@vkoshcheev

Description

@vkoshcheev

Steps to reproduce

  1. Set up <Select> component and use theme with transition component override, e.g.:
const theme = createTheme({
  components: {
    MuiSelect: {
      defaultProps: {
        MenuProps: {
          slots: {
            transition: Fade,
          },
        },
      },
    },
  },
});
  1. Open select menu.

Current behavior

Default transition component is used (Grow).

Expected behavior

Transition component is replaced with Fade.

Context

The only working way to replace transition component right now seems to be to use MenuProps.TransitionComponent, on each particular Select, and TransitionComponent is marked as deprecated.

<Select
  ...
  MenuProps={{
    TransitionComponent: Fade,
  }}
>

Breaking change apparently occurred in 7.3.0 or after, worked fine in 7.2.0.

Your environment

npx @mui/envinfo

Search keywords: Select

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: selectChanges related to the select.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions