set the width of select2 input (through Angular-ui directive)
You need to specify the attribute width to resolve in order to preserve element width
$(document).ready(function() {
$("#myselect").select2({ width: 'resolve' });
});
In my case the select2 would open correctly if there was zero or more pills.
But if there was one or more pills, and I deleted them all, it would shrink to the smallest width. My solution was simply:
$("#myselect").select2({ width: '100%' });