office-ui-fabric

Set width for ComboBox


I have a ComboBox as follows:

enter image description here

How can I set the width of both 1 and 2 the same?

enter image description here


Solution

  • ComboBox has a property called useComboBoxAsMenuWidth when you set it will make sure it matches the menu width.

    Here is a codepen https://codepen.io/mohamedhmansour/pen/ZqdEMY