Closed ryanmortier closed 11 years ago
You can specify a number for the minimumResultsForSearch
option:
The minimum number of results that must be initially (after opening the dropdown for the first time) populated in order to keep the search field. This is useful for cases where local data is used with just a few results, in which case the search box is not very useful and wastes screen space.
For example:
$("#e2").select2({
minimumResultsForSearch: 99
});
Oh sorry, I misread that option. Thank you!
Thanks
Only for record, set minimumResultsForSearch to 99 really does not solve the problem, the search box will be back if size of drop down itens were greater than 99
The correct code is:
$("#e2").select2({ minimumResultsForSearch: Infinity });
Is there a way to use the basic styling without the search box?