How to keep Material-ui select's width to the widest menuItem?

Viewed 117

Material-ui Select adapts the select's width according to selected MenuItem's width. I would like to keep it as large as the largest possible menu item: It looks a bit unfinished when the form modifies its size. I couldn't find any reference to that in the doc.

  • I can fix the width in css, but it's not adaptative to option edition.
  • I can use JS to multiply the number of characters of the menu item and multiply it by the maximum width of one letter and apply this width to the select.

Is there a simpler solution I didn't find?

Thanks

Small Item Large Item

0 Answers
Related