SW Dog
SW Dog

Reputation: 187

MaterialUI Dropdown Icon does not expand menu

I am trying to use the MaterialUI Select component (Reference Doc) with the IconComponent option.

The icon shows up, but when you click it the menu does not expand.

Here is an example in codesandbox: Material Select Icon Issue

How can I have the menu expand normally? Did I format the icon incorrectly?

Upvotes: 2

Views: 1114

Answers (1)

N'Bayramberdiyev
N'Bayramberdiyev

Reputation: 3620

Pass .MuiSvgIcon-root and .MuiSelect-icon classes as props to CheckMark component in your CheckMarkInternal() method.

const CheckMarkInternal = () => {
    return (
      <CheckMark
        fill="purple"
        width={50}
        height={50}
        className="MuiSvgIcon-root MuiSelect-icon"
        style={{ pointerEvents: "none", marginLeft: "20", marginRight: "20" }}
      />
    );
};

Check this please.

Upvotes: 2

Related Questions