apalfrey / select2-bootstrap-5-theme

A Select2 v4 theme for Bootstrap 5
https://apalfrey.github.io/select2-bootstrap-5-theme/
MIT License
212 stars 48 forks source link

select2 not showing correctly inside Bootstrap Floating Labels #56

Closed ricky-gomez closed 2 years ago

ricky-gomez commented 2 years ago

When you place a standard select element inside a .form-floating class (Bootstrap 5) it displays correctly, but once you replace the standard select element with Select2 it no longer displays correctly.

Example code:

<div class="form-floating">
    <select id="floatingLabelsExample" class="form-select">
        <option value="1">Option 1</option>
        <option value="2">Option 2</option>
        <option value="3">Option 3</option>
    </select>
    <label for="floatingLabelsExample">Choose an option</label>
</div>

See: https://getbootstrap.com/docs/5.1/forms/floating-labels/

ricky-gomez commented 2 years ago

I apologize for repeating an issue, I did not realize. So I'm going to close this one.