I have an input select element in Bootstrap like so :
<div class="form-group">
<label for="exampleSelect">Example select</label>
<select class="form-control" id="exampleSelect">
</select>
</div>
where the options are dynamically added (JQuery), the problem is that chances are the options could be of a very high number maybe 10000 options.
My question is, is it possible to make a portion of the options hidden until the user asks for them ?
Thanks.
2
Answers
This could be done with the help of size attribute, as per specs:
Here is an example of how this works:
My suggestion from the comments would mean something like this (based on n–`s answer for generating the select field.)
It shows only the first ten options by default, and after you click the button, and open the select again, it will show all of them.
(Of course that is still not very fun to work with, from a user perspective …)