Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How to show dropdown on button click using material ui?

Currently, I'm able to do so but extra select field is getting populated which is not required. I don't want to hide select field with css.

Also, How can I change width, height, position and other properties of generated popover using material ui? codesandbox url: https://codesandbox.io/s/du8mr

current implementation

popover


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
457 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use Menu component instead of a Select component.

You can change the Menu props using MenuProps which receives all Popover props.

From Menu documentation:

Any other props supplied will be provided to the root element (Popover).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...