I have a select that brings information from a JS, however this select is forming a scroll bar and the options are not many and there is room for more options to be shown however regardless of what I try I am not able to make all the data is displayed instead of the scroll bar.
My select call in HTML
<div class="row">
<div>
<span>Selecione sua localidade: </span>
<select id="cities" class="empty" name="cities" onclick="selected(this.value)">
<option selected >Selecionar</option>
</select>
</div>
</div>
Here I make the Select
var $select = $('#cities');
$.each(items, function(index, val) {
var optgroup = $('<optgroup>');
optgroup.attr('label', index);
$.each(val, function(index, val) {
optgroup.append($('<option>', {
text: val.loja,
value: val.idx
}));
});
$select.append(optgroup);
});
This way it reads the JS file and groups it into select.