Reputation: 97
What could be a reason of this ? One element of select2 is displaying normally and the other one not ? I tried to change the structure of the html and also there are not any other styles that might override it. It seems the plugin is giving the broken select "as on the picture" dynamic width. Strange but thanks for any help.
Upvotes: 1
Views: 362
Reputation: 433
Just add width options $("#company-filter").select2({ dropdownAutoWidth : true, width : '<value>'});
instead of $("#company-filter").select2();
and add some padding-right for dropdown button, so
.select2-container .select2-selection--single .select2-selection__rendered {
padding-left: 20px;
padding-right: 50px;
}
Upvotes: 2