set the width of select2 input (through Angular-ui directive)

前端 未结 12 1814
名媛妹妹
名媛妹妹 2020-12-22 20:14

I have problem making this plunkr (select2 + angulat-ui) work.

http://plnkr.co/edit/NkdWUO?p=preview

In local setup, I get the select2 work, but I cannot set

12条回答
  •  余生分开走
    2020-12-22 21:10

    You need to specify the attribute width to resolve in order to preserve element width

    $(document).ready(function() { 
        $("#myselect").select2({ width: 'resolve' });           
    });
    

提交回复
热议问题