Skip to content

[material-ui][Menu,Popover] slotProps cannot modify backdrop slot #43222

@sydneyjodon-wk

Description

@sydneyjodon-wk

Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/backdrop-slotprops-hyhvct?file=%2Fsrc%2FDemo.tsx

Steps:

  1. Try to set backdrop in slotProps for Menu or Popover components

Current behavior

Hello 👋

I think this is similar to #38949, but I am unable to set the backdrop slot on the Menu or Popover components - maybe I am misunderstanding, but the BackdropProps prop is deprecated and says to use slotProps.backdrop, but it doesn't seem to work.

Expected behavior

I expected to be able to modify the backdrop props on Menu and Popover components like this:

slotProps={{ backdrop: { style: { backgroundColor: "#fad" } } }}

Context

I'm trying to change the props on the backdrop for Menu and Popover

Your environment

See code sandbox: https://codesandbox.io/p/sandbox/backdrop-slotprops-hyhvct?file=%2Fsrc%2FDemo.tsx

Search keywords: backdrop slot

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: PopoverThe React component.customization: domComponent's DOM customizability, e.g. slot.good first issueGreat for first contributions. Enable to learn the contribution process.ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: menuChanges related to the menu.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions