Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable word wrap when open select2 drop down menu

How i can disable word wrap when open select2 drop down menu?

select2

in next picture when i use standard GUI, words not moved to a new line and line width is increased

standart windows GUI dropdown menu

like image 513
Unknown.Vagrant Avatar asked Sep 20 '25 03:09

Unknown.Vagrant


1 Answers

You can set dropdownAutoWidth as true:

$("selector").select2({
    dropdownAutoWidth : true
});

Hope this helps.

like image 198
Beginner Avatar answered Sep 22 '25 23:09

Beginner