I am creating a custom auto suggest-box I need to move on items on arrow down press. it is not a 'li' (as in other examples) but an 'input'
if with the keyboard arrows I go down, and after that it exits the screen while the mouse down behaves perfectly.
how can I do so that, if I go down with the arrows, I continue to see the auto-completed text?
function autocompleteCodice(element) {
var options = {
url: function(phrase) {
return "/prodotti/search?t=codice&q=" + phrase;
},
getValue: "code",
list: {
maxNumberOfElements: 500,
onSelectItemEvent: function() {
var descrizione = $(element).find(".codice-materiale").getSelectedItemData().name;
var um = $(element).find(".codice-materiale").getSelectedItemData().um;
$(element).find(".descrizione-materiale").val(descrizione).trigger("change");
$(element).find(".um-materiale").val(um).trigger("change");
}
}
};
$(".codice-materiale").easyAutocomplete(options);
}
<div class="col-lg-2 col-md-4 m-form__group-sub focus-codice">
<label>Codice:</label>
<input type="text" class="form-control m-input codice-materiale w-100" name="codice" placeholder="">
<span class="m-form__help"></span>
</div>