posted 9 years ago
In general, the width of the dropdown depends on the option on the list which has the highest character length.
What I want to do is to set the dropdown width based on the selected choice's character length.
For example, I have 'Good', 'Delicious' and 'Supercalifragilisticexpialidocious'; If I select 'Good', the width of the dropdown will auto adjust just to display 'Good' (for example 50px). If I select Supercalifragilisticexpialidocious the width becomes 100px.