I want to be able to type a space (keycode=32) but bootstrap-select does not let me type it. Any idea how I can allow spaces to be input?
I'm using v1.11.0
I want to be able to type a space (keycode=32) but bootstrap-select does not let me type it. Any idea how I can allow spaces to be input?
I'm using v1.11.0
May be something else is preventing you from entering space, bootstrap-select does no prevent your from entering spaces, checkout demo below:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.11.0/css/bootstrap-select.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.11.0/js/bootstrap-select.min.js"></script>
<select class="selectpicker" data-live-search="true">
<option>Hot Dog, Fries and a Soda</option>
<option>Burger, Shake and a Smile</option>
<option>Sugar, Spice and all things nice</option>
</select>
//CAN ENTER SPACES
$(function() {
$('.selectpicker').selectpicker({
liveSearch: false,
showSubtext: true
});
});
//CANNOT ENTER SPACES
$(document).ready(function() {
$('.selectpicker').selectpicker({
liveSearch: false,
showSubtext: true
});
});