I am facing an issue where the field shrinks drastically when I type in it. Here's a code snippet that showcases this problem:
$(function() {
$("select").select2({
placeholder: "Select a word",
width: "100%"
});
});
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet"/>
<link href="https://select2.github.io/select2-bootstrap-theme/css/select2-bootstrap.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.full.js"></script>
<div class="container">
<form class="form-inline">
<div class="form-group row">
<div class="col-sm-12">
<select multiple="multiple" name="word" id="word">
<option value="1">A really long string</option>
</select>
</div>
</div>
</form>
</div>
Does anyone know how to prevent this field from shrinking?