select2 / select2-bootstrap-theme

A Select2 v4 Theme for Bootstrap 3
https://select2.github.io/select2-bootstrap-theme/
MIT License
872 stars 499 forks source link

Input-lg doesn't work #58

Closed jrean closed 7 years ago

jrean commented 7 years ago

Hi,

Nothing to do, my input is not "LG", nor "SM"... When I load the page, my default select is displayed in LG then a few milliseconds later the plugins loads I guess and the input change its height to "Medium".

<select class="companies-select2 form-control input-lg select2-hidden-accessible" name="company_id" tabindex="-1" aria-hidden="true"><option value="1">Google</option><option value="2">Yahoo</option></select>

Am I missing something?

staff0rd commented 7 years ago

I have this and also don't see the result rendered large;

<form class="form-horizontal">
    <div class="form-group form-group-lg">
        <label class="col-sm-2 control-label" for="mySelect">MyLabel</label>
        <div class="col-sm-10">
            <select class="form-control" id="mySelect"></select>
        </div>
    </div>
</form>

Somehow it's working on the demo tho.

EDIT; NVM, I wasn't setting the theme;

$.fn.select2.defaults.set( "theme", "bootstrap" );
sigo commented 7 years ago

This issue should be closed now I think. Adding .form-group-lg class at .form-group element and applying theme works great.

jrean commented 7 years ago

@sigo thank you. You are right!

For reference: <div class="form-group form-group-lg">