So I have this html datalist that consists of almost 6000 options, something like the example bellow.
The problem is it opens up A LOT options over your browser and I only require about 10 to be visible at a time and it needs to be a field that auto-completes when you start typing
Is there any way to display only the top 10 options that returns from the list?
for (i = 0; i < 6000; i++) {
$('#myList').append("<option value=Example'"+i+"'></option>");
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input list="myList">
<datalist id="myList">
</datalist>
I found this post from 3 years ago but it is too slow to use on my amount of options. Was hoping someone found a better(faster) solution or at least an alternative solution since.